
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How to get last day of the previous month in MySQL?
With the help of following MySQL query, we can get the last day of previous month −
mysql> SELECT LAST_DAY(now() - INTERVAL 1 MONTH) AS 'LAST DAY OF PREVIOUS MONTH'; +----------------------------+ | LAST DAY OF PREVIOUS MONTH | +----------------------------+ | 2017-09-30 | +----------------------------+ 1 row in set (0.00 sec)
- Related Articles
- How to get the first day of the previous month in MySQL?
- How to get last day of the current month in MySQL?
- How to get last day of the next month in MySQL?
- How to get the last business day of previous month based on today in Excel?
- Get the last day of month in Java
- How to get last day of a month in Python?
- How to get the previous day with MySQL CURDATE()?
- How to get the first day of next month in MySQL?
- How to display first day and last day of the month from date records in MySQL?
- How to get the first day of the current month in MySQL?
- Java Program to get day of week for the last day of each month in 2019
- How to get first day of every corresponding month in MySQL?
- Get all MySQL records from the previous day (yesterday)?
- How to get the day of the month in JavaScript?
- Get the first and last date of next month in MySQL?

Advertisements