Syntax
LAST_DAY(date)
Purpose
LAST_DAY() returns the last date of the month of date.
Examples
obclient> SELECT LAST_DAY('2004-02-05');
+------------------------+
| LAST_DAY('2004-02-05') |
+------------------------+
| 2004-02-29 |
+------------------------+
1 row in set
obclient> SELECT LAST_DAY('2004-01-01 01:01:01');
+---------------------------------+
| LAST_DAY('2004-01-01 01:01:01') |
+---------------------------------+
| 2004-01-31 |
+---------------------------------+
1 row in set