Mega Code Archive

 
Categories / MySQL / Date Time
 

Extract just the date

mysql> mysql> mysql> SELECT DATE('2004-12-31 23:59:59'); +-----------------------------+ | DATE('2004-12-31 23:59:59') | +-----------------------------+ | 2004-12-31                  | +-----------------------------+ 1 row in set (0.00 sec)