This tutorial explains how to use the MySQL LAST_DAY function with syntax and examples.
The MySQL LAST_DAY function returns the last day of the month for a given date.
The syntax for the LAST_DAY function in MySQL is:
The date or datetime value from which to extract the last day of the month.
The LAST_DAY function can be used in the following versions of MySQL:
Let's look at some MySQL LAST_DAY function examples and explore how to use the LAST_DAY function in MySQL.
For example:
This last LAST_DAY example would display the last day of the month for the current system date (current system date is returned by the CURDATE function).