hello,
pls i want to convert this 06-29-2010 04:00PM to this format Y-m-d h:i:s in php
thanks
hello,
pls i want to convert this 06-29-2010 04:00PM to this format Y-m-d h:i:s in php
thanks
Use strtotime
:
$date = '06-29-2010 04:00PM';
$date = str_replace('-', '/', $date);
echo date('Y-m-d h:i:s', strtotime($date));
Result:
2010-06-29 04:00:00