Dates and timesSQL standard

CURRENT_DATE

Returns today's date — without the time.

Syntax

CURRENT_DATE

It's written without brackets, like a word. The result type is date, so you add whole days to it: CURRENT_DATE + 7 is a week from now. Like NOW(), the value stays the same for the whole transaction and depends on the session's time zone: for someone it's already tomorrow.

Data for the examples

orders

idcreated_atamount
12026-07-03 10:15:00120.50
22026-07-28 18:40:0080.25
32026-08-09 09:05:00199.99
42026-08-21 14:30:0045.00
52026-09-02 11:00:0064.75

These tables already exist in the sandbox — the examples below use them. Want to try this in your own database? Copy the SQL.

Today
SELECT CURRENT_DATE AS today;
today
2026-09-14

Press “Run” to see your date.

A week from now and a month ago
SELECT CURRENT_DATE + 7 AS next_week,
CURRENT_DATE - INTERVAL '1 month' AS month_ago;
next_weekmonth_ago
2026-09-212026-08-14 00:00:00
How many days have passed since each order
SELECT id, created_at,
CURRENT_DATE - created_at::date AS days_ago
FROM orders;
idcreated_atdays_ago
12026-07-03 10:15:0073
22026-07-28 18:40:0048
32026-08-09 09:05:0036
42026-08-21 14:30:0024
52026-09-02 11:00:0012

The difference between two dates is a whole number of days.

Watch out

No brackets: CURRENT_DATE() throws syntax error at or near "(".

CURRENT_DATE - INTERVAL '1 month' is no longer a date but a timestamp. If you need a plain date, add ::date.

Compare it with a timestamp column using a range: created_at = CURRENT_DATE only finds moments at exactly midnight. For today — created_at >= CURRENT_DATE AND created_at < CURRENT_DATE + 1.

Related functions

Learn more in the course