SQL Keywords

SQL CURRENT_DATE

What does the SQL CURRENT_DATE keyword do?

Returns the current date of the database session as a DATE value without a time component.
Sign up to get up to date news on SQL keywords
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Compatible dialects for SQL CURRENT_DATE: PostgreSQL, MySQL, MariaDB, SQL Server (as CURRENT_TIMESTAMP cast to DATE), Oracle, SQLite, Snowflake, BigQuery, DuckDB, and most other ANSI-compliant systems

SQL CURRENT_DATE Full Explanation

CURRENT_DATE is an ANSI SQL standard date literal that evaluates to the current calendar date according to the database server's session time zone. It returns a value of the DATE data type, typically formatted as YYYY-MM-DD. Because CURRENT_DATE is evaluated once per statement, multiple references within the same statement will yield the same value. It does not accept parentheses or parameters. The result does not include a time-of-day portion; if you need both date and time, use keywords such as CURRENT_TIMESTAMP or NOW instead. CURRENT_DATE is deterministic within a single transaction but will advance as the server clock changes across transactions.

SQL CURRENT_DATE Syntax

CURRENT_DATE

SQL CURRENT_DATE Parameters

Example Queries Using SQL CURRENT_DATE

-- Basic usage
SELECT CURRENT_DATE;

-- Log daily report generation
INSERT INTO reports (run_date, notes)
VALUES (CURRENT_DATE, 'Daily inventory snapshot');

-- Filter rows created today
SELECT *
FROM orders
WHERE order_date = CURRENT_DATE;

Expected Output Using SQL CURRENT_DATE

  • Each query substitutes CURRENT_DATE with today's date
  • For example, on 2024-06-11 the first query returns one row with value 2024-06-11

Use Cases with SQL CURRENT_DATE

  • Stamp tables with the current date during inserts or updates
  • Compare a DATE column to today for filtering recent records
  • Drive daily partitions or batch processes
  • Supply default values in table definitions or stored procedures

Common Mistakes with SQL CURRENT_DATE

  • Writing CURRENT_DATE() with parentheses which causes a syntax error in most databases
  • Expecting a time component; CURRENT_DATE returns only the date
  • Assuming it respects client time zone instead of server session time zone
  • Comparing a TIMESTAMP column directly to CURRENT_DATE without casting, leading to mismatches

Related Topics

CURRENT_TIMESTAMP, CURRENT_TIME, NOW, SYSDATE, GETDATE, DATE datatype, TIMEZONE

First Introduced In

SQL-92

Frequently Asked Questions

Does CURRENT_DATE include the time?

No. It returns only the date part. Use CURRENT_TIMESTAMP or NOW to get both date and time.

Why does CURRENT_DATE() with parentheses fail?

CURRENT_DATE is a reserved keyword, not a function. Parentheses cause a syntax error in most databases.

How often is CURRENT_DATE evaluated within a transaction?

It is evaluated once per statement. Reusing it multiple times in the same statement yields the same value.

Which time zone does CURRENT_DATE use?

The database session's time zone determines the date. If your session is set to UTC, CURRENT_DATE reflects the UTC calendar date.

Sign up to get up to date news on SQL keywords
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.
Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo

Check out other commonly used SQL Keywords!