Syntax error How to get last day of the current month in MySQL?

How to get last day of the current month in MySQL?



With the help of following MySQL query, we can get the last day of the current month −

mysql> SELECT LAST_DAY(now()) AS 'LAST DAY OF CURRENT MONTH';
+---------------------------+
| LAST DAY OF CURRENT MONTH |
+---------------------------+
| 2017-10-31                |
+---------------------------+
1 row in set (0.00 sec)
Updated on: 2020-01-29T05:17:54+05:30

465 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements