Mega Code Archive

 
Categories / MySQL Tutorial / Date Time Functions
 

DATE(expr) Extracts the date part of the date or datetime expression expr

mysql> mysql> SELECT DATE('2003-12-31 01:02:03'); +-----------------------------+ | DATE('2003-12-31 01:02:03') | +-----------------------------+ | 2003-12-31                  | +-----------------------------+ 1 row in set (0.00 sec) mysql>