May 2005
Intermediate to advanced
352 pages
14h 39m
English
LAST_DAY( )
LAST_DAY(date)This function returns the date of the last day of the month for a given date. This function is available as of Version 4.1.1 of MySQL.
SELECT LAST_DAY('2005-12-15')
AS 'End of Month';
+--------------+
| End of Month |
+--------------+
| 2005-12-31 |
+--------------+This function is more meaningful when you apply it to a date column where the date is unknown before entering the SQL statement.
Read now
Unlock full access