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

MySQLMySQLi Database

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)
raja
Published on 19-Feb-2018 12:25:39
Advertisements