Tag Archives: Development

PHP strtotime

Just a note straight out of the php manual for the function: strtotime – int strtotime ( string $time [, int $now = time() ] ) Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components –  if the separator is a slash (/), then the American…

Mysql date only from a date time field.

If your date in mysql is in a datetime field  : 2012-04-29 14:07:51 and you just want the date part , not the time and also in european format use this: select DATE_FORMAT( DATE( field) , ‘%D %M, %Y’) from X