SELECT CURDATE();
Output is 2025-10-15
, this is in the format YYYY-MM-DDCURDATE()
SELECT CURDATE()- interval 1 day as Yesterday,
CURDATE() as Today,
CURDATE()+ interval 1 day as Tomorrow
Yesterday | Today | Tomorrow |
2025-10-14 | 2025-10-15 | 2025-10-16 |
SELECT CURDATE()- interval 1 month as LastMonth,
CURDATE() as Today,
CURDATE()+ interval 1 Month as NextMonth
Last Month | Today | Next Month |
2025-09-15 | 2025-10-15 | 2025-11-15 |
SELECT DATE_FORMAT(CURDATE() - INTERVAL 1 MONTH,'%Y-%m-01')
SELECT LAST_DAY(CURDATE() - INTERVAL 1 MONTH)
Last Month First Day | Last Month Last Day |
2025-09-01 | 2025-09-30 |
SELECT * FROM `dt_table` WHERE
date BETWEEN DATE_FORMAT(CURDATE() ,'%Y-%m-01') AND CURDATE()
More on BETWEEN DATE Query
Read more on how to store default date and time in MySQL table here.
Examples of CURDATE() to get different range of records.
SQL Date ReferencesGroup By in Date field NOW() : Current Date with TimeAuthor
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.