<pre><code>$doba = explode("/", $dob);

$date = date("Y-m-d", mktime(0,0,0, $doba[0], $doba[1], $doba[2]));
</code></pre>

<p>The above code turns any date i pass through into 1999-11-30 and i know it was working yesterday. Date is correct when I echo $doba. Anyone have any ideas?</p>

<p>Cheers</p>

What is the format of
```
$doba
```
? Remember
```
mktime
```
's syntax goes hour, minute, second,
month, day year
which can be confusing.
Here's some examples:
```
```
$doba = explode('/', '1991/08/03');
echo(date('Y-m-d', mktime(0,0,0, $doba[1], $doba[2], $doba[0]);

$doba = explode('/', '03/08/1991');
echo(date('Y-m-d', mktime(0,0,0, $doba[1], $doba[0], $doba[2]);
```
```