Mega Code Archive

 
Categories / MySQL / Date Time
 

To find out what date it is, according to the server, you can use the CURRENT_DATE() function

mysql> mysql> mysql> SELECT NOW(),CURRENT_DATE(); +---------------------+----------------+ | NOW()               | CURRENT_DATE() | +---------------------+----------------+ | 2011-10-04 09:21:37 | 2011-10-04     | +---------------------+----------------+ 1 row in set (0.00 sec)