
- 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 the first day of the current month in MySQL?
With the help of following MySQL query, we can get the first day of the current month −
mysql> SELECT DATE_SUB(LAST_DAY(NOW()),INTERVAL DAY(LAST_DAY(NOW()))- 1 DAY) AS 'FIRST DAY OF CURRENT MONTH'; +----------------------------+ | FIRST DAY OF CURRENT MONTH | +----------------------------+ | 2017-10-01 | +----------------------------+ 1 row in set (0.00 sec)
- Related Articles
- How to get last day of the current month in MySQL?
- How to get the first day of next month in MySQL?
- How to get the first day of the previous month in MySQL?
- How to get first day of every corresponding month in MySQL?
- How to get last day of the previous month in MySQL?
- How to get last day of the next month in MySQL?
- How to display first day and last day of the month from date records in MySQL?
- How to get current day, month and year in Java 8?
- Filter the records of current day, month and year in MySQL?
- How to get first and last date of the current month with JavaScript?
- How to get the day of the month in JavaScript?
- MySQL query to order by current day and month?
- How to get the same or first day of next month on a given date in Excel?
- Get the first and last date of next month in MySQL?
- Get the last day of month in Java

Advertisements