CURRENT_DATE

Return the current session date with no time component.

Category: datetimeReturns: DATEDialect: Standard

Syntax

CURRENT_DATE()

Description

## Overview Returns the current date as a DATE value (year, month, day) with no time-of-day component. The value is computed once per transaction, so every reference to CURRENT_DATE inside a single transaction produces the same result regardless of how long the transaction runs. Use CURRENT_DATE for day-level filtering, ageing calculations, date math with DATE_ADD or DATE_SUB, and as a default value in INSERT statements where you want to record the calendar day an operation occurred. ## Behavior - Returns a DATE (no hours, minutes, or seconds). - Never returns NULL; the value is always well defined. - Stable within a transaction: repeated calls during the same transaction return the same date. - The parentheses are optional in many dialects; CURRENT_DATE and CURRENT_DATE() are accepted as equivalent. - Comparable directly to DATE literals and to expressions returning DATE. - When compared against a TIMESTAMP column, the DATE is implicitly promoted to TIMESTAMP at midnight. ## Timezone handling - The returned date reflects the calendar day in the session time zone. Two users running the same query at the same instant but in different time zones can see different dates near the day boundary. - Changing the session time zone mid-transaction does not change the value that has already been fixed for that transaction. - Use CURRENT_TIMESTAMP or NOW when you need the full instant rather than just the calendar day. ## Compatibility - Part of the SQL standard (ANSI/ISO SQL:2016). The bare keyword form (CURRENT_DATE without parentheses) is the standard spelling; the function-call form is a widely supported extension.

Examples

-- Today's date in the session time zone
SELECT CURRENT_DATE();
-- Filter rows from the last seven days of activity
SELECT event_id, occurred_at
FROM analytics.events.user_activity
WHERE occurred_at >= DATE_SUB(CURRENT_DATE(), 7);
-- Days remaining until each project deadline
SELECT project_id, DATEDIFF(deadline, CURRENT_DATE()) AS days_remaining
FROM project_mgmt.core.projects;
-- Compare CURRENT_DATE (transaction stable) with CLOCK_TIMESTAMP (wall clock)
SELECT CURRENT_DATE() AS stable_date, CLOCK_TIMESTAMP()::DATE AS wall_date;
-- Partition orders into today vs historical buckets
SELECT CASE WHEN order_date = CURRENT_DATE() THEN 'today' ELSE 'historical' END AS bucket,
       COUNT(*) AS order_count
FROM commerce.sales.orders
GROUP BY bucket;

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →