CURRENT_DATE
SQL · Date Functions
Theory
CURRENT_DATE gives you today's date, read from the database server's clock at the moment the query runs. It returns a DATE value with no time part, such as 2026-11-08. Because it is a special keyword defined by the SQL standard, most databases write it without parentheses: SELECT CURRENT_DATE.
Its real power shows up when you combine it with other date logic. For example, WHERE order_date >= CURRENT_DATE - 7 (or the dialect's equivalent) means 'orders from the last week', and the query keeps working tomorrow without anyone editing a hard-coded date. PostgreSQL, MySQL, Oracle, Snowflake and SQLite all accept CURRENT_DATE; SQL Server traditionally uses CAST(GETDATE() AS DATE). The date is based on the server's (or session's) time zone, so a server in UTC may already be on 'tomorrow' for a user in Jaipur.
Why we use it
Reports and filters often need to be relative to today: last 7 days, overdue invoices, age of a record. CURRENT_DATE lets the query compute 'today' itself, so it never goes stale like a hard-coded date literal does.
When to use it
Use it for rolling filters, default values of date columns and age or overdue calculations. If you need the time too, use CURRENT_TIMESTAMP. For repeatable tests or backfills, pass a fixed date instead so results do not change daily.
How it works
- Query starts running
- Database reads the server clock once
- Keep only the date part (no hours/minutes)
- Used in a comparison or arithmetic? Yes: Compare or shift it (today - 7). No: Return it as a date.
- Result reflects the date on the day it runs
Syntax
CURRENT_DATEExample
SELECT CURRENT_DATE;Key points
- A keyword, not a function — no parentheses in most dialects
- Useful default for created_at/updated_at columns
- Returns a DATE only; use CURRENT_TIMESTAMP when you also need the time
- Depends on the server/session time zone, so 'today' can differ from the user's local date
- SQL Server equivalent: CAST(GETDATE() AS DATE); SQLite also accepts date('now')