Question: I want to convert this date ( 02-12-2010) mm-dd-yyyy to time format

ie 

to 02-12-2010 0 hours 0 minutes and 0 seconds

i have user time and date functions but when i refresh the page its value is changing as per the time.

i need that to be fixed 

also i want to convert this date (01-24-2009) to time format.

please help me

Thanks

Answer: 
Use the [strtotime](http://www.php.net/strtotime) function to convert an existing date/time string into a timestamp for the [date](http://www.php.net/date) function.

```
$new_date = date('m-d-Y h:i:s', strtotime('02-12-2010'));

```

The reason that your date keeps updating with the current time is that the date() function uses the current system's timestamp by default when no second parameter is provided.
You can use the [**strtotime**](http://php.net/manual/en/function.strtotime.php) function eg:

```
$mydate = date('m-d-Y h:i:s', strtotime('02-12-2010'));

```