Mega Code Archive

 
Categories / MySQL Tutorial / Date Time Functions
 

LAST_DAY(date) returns the corresponding value for the last day of the month

Returns NULL if the argument is invalid. mysql> mysql> SELECT LAST_DAY('2003-02-05'); +------------------------+ | LAST_DAY('2003-02-05') | +------------------------+ | 2003-02-28             | +------------------------+ 1 row in set (0.00 sec) mysql>