Function or operator · Text, numbers and dates

CURRENT_DATE

CURRENT_DATE returns today's date, with no time, according to the engine's time settings.

CURRENT_DATE example

When this guide was reviewed, the SQLite database returned this date:

SQL
SELECT CURRENT_DATE AS today;

If you run the query on another day, the value will be different. The example shows the result checked on the review date, not a permanent output.

Records before today
SELECT name, registered_at
FROM customers
WHERE registered_at < CURRENT_DATE
ORDER BY registered_at
LIMIT 5;

The condition is evaluated every time the query runs. In a real database, check that registered_at has a suitable date type and is not ambiguous text.

Check the result with small data

In SQLite you can build a date relative to a fixed base date.

Self-contained query · SQLite
SELECT DATE('2026-10-10') AS base_day,
       DATE('2026-10-10', '+1 day') AS next_day;
Query result
base_daynext_day
2026-10-102026-10-11

The fixed date lets you repeat the example and get the same result. In a daily query, replace that base date with CURRENT_DATE: the engine will evaluate it and it will change every day.

Check your understanding: Why is a fixed date a bad idea if you want a daily report?

Show answer

Because a fixed date always returns the same day: tomorrow's report would keep calculating as if it were today. CURRENT_DATE is evaluated on every run.

How CURRENT_DATE is used

In PostgreSQL and MySQL it can be used as a keyword. MySQL also supports CURRENT_DATE() and CURDATE(). SQLite recognises CURRENT_DATE as a special value tied to its date functions.

Common mix-ups with CURRENT_DATE

Replacing today's date with a fixed literal

Only works for one specific date
WHERE registered_at < '2026-08-03'

A literal does not update itself tomorrow. Use one when the cut-off must be exactly that day. Use CURRENT_DATE when the condition must follow the engine's calendar.

Key differences between engines

PostgreSQL computes the current date and time values consistently within a transaction. MySQL returns the date in the session's time zone and offers synonyms such as CURDATE(). SQLite uses UTC for its special value CURRENT_DATE. Check the time zone when a one-day difference matters.