CURDATE() in MySQL — How It Works

What the MySQL CURDATE() function does, with an example.

Published October 19, 2026

CURDATE() returns today's date (no time) in the session time zone as a DATE.

How it works

Equivalent to CURRENT_DATE. Combine with INTERVAL for date maths.

Try it in MySQL

SELECT CURDATE()
2026-11-12
SELECT CURDATE() - INTERVAL 7 DAY
2026-11-05
SELECT * FROM orders WHERE order_date = CURDATE()
today's orders

Practical examples

Example 1

SELECT CURDATE();
-- 2026-11-12

Example 2

SELECT CURDATE() - INTERVAL 7 DAY;
-- 2026-11-05

Example 3

SELECT * FROM orders WHERE order_date = CURDATE();
-- today's orders

Use it in a real query

SELECT id, CURDATE() AS result
FROM your_table
LIMIT 10;

Common mistakes

  • Comparing DATETIME columns with a date and missing rows (use ranges).
  • Time zone differences.
  • Using it where a time is needed.

Key takeaways

  • CURDATE() in one line: CURDATE() returns today's date (no time) in the session time zone as a DATE.
  • Try queries in a test database first.
  • Check NULL handling and data types.

FAQ

Rows from today?

WHERE created_at >= CURDATE() AND created_at < CURDATE() + INTERVAL 1 DAY.

Does CURDATE() work in other databases?

Most have an equivalent, but names and syntax vary between MySQL, PostgreSQL, SQL Server and SQLite.

More SQL articles