<?php //output of datetime $tempDate = DateTime::createFromFormat('j-M-Y', '15-Feb-2009'); echo $tempDate->format('Y-m-d H:i:s'); //for debug - var_dump()
Standard input is empty
2009-02-15 19:09:02object(DateTime)#1 (3) {
["date"]=>
string(26) "2009-02-15 19:09:02.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
string(3) "UTC"
}