Skip to main content
Version: V1.0.0

LAST_DAY

Declaration

LAST_DAY(date)

Description

Returns the date value of the last day of the month for date.

Examples

SELECT LAST_DAY('2004-02-05');
+------------------------+
| LAST_DAY('2004-02-05') |
+------------------------+
| 2004-02-29 |
+------------------------+
1 row in set (0.001 sec)

SELECT LAST_DAY('2004-01-01 01:01:01');
+---------------------------------+
| LAST_DAY('2004-01-01 01:01:01') |
+---------------------------------+
| 2004-01-31 |
+---------------------------------+
1 row in set (0.000 sec)