Hai folks, Mysql : field name : dt Data type : datetime php : $dt=date('Y-m-d h:i:sa'); Code (markup): above code correctly prints 2011-06-30 08:27:23pm Problem is the Ante meridiem is not added to the date in mysql. it just shows for example : 2011-06-30 08:27:23 Why Ante meridiem is not saving
I just convert it to unixtime then store it to a int value in mysql. Then when I need to show it use the date function to convert the saved unixtime to the date.
Hai exodus, if i store the date time as unixtime, will ORDER BY dt works? coz i use to order result sets by dt field only.