Mega Code Archive

 
Categories / MySQL Tutorial / Date Time Functions
 

If the resulting date has a day that is larger than the maximum day for the new month, the day is adjusted to the maxi

mysql> mysql> SELECT DATE_ADD('1998-01-30', INTERVAL 1 MONTH); +------------------------------------------+ | DATE_ADD('1998-01-30', INTERVAL 1 MONTH) | +------------------------------------------+ | 1998-02-28                               | +------------------------------------------+ 1 row in set (0.00 sec) mysql>