Mega Code Archive

 
Categories / MySQL Tutorial / Date Time Functions
 

If you add to or subtract from a date value something that contains a time part, the result is automatically converted

mysql> mysql> SELECT DATE_ADD('1999-01-01', INTERVAL 1 DAY); +----------------------------------------+ | DATE_ADD('1999-01-01', INTERVAL 1 DAY) | +----------------------------------------+ | 1999-01-02                             | +----------------------------------------+ 1 row in set (0.00 sec) mysql>