MySQL CURRENT_DATE() Function
MySQL CURRENT_DATE(): ANSI SQL Standard Current Date
CURRENT_DATE() and its parenthesis-free form CURRENT_DATE return today's date in the active MySQL session time zone. As the ANSI SQL synonym for CURDATE(), it helps keep your queries portable across database engines.
Analytics queries use CURRENT_DATE to compute customer tenure, filter active subscriptions, and mark daily checkpoints.
Syntax
MySQL supports both the standard keyword form and the function-call form:
CURRENT_DATE
CURRENT_DATE()
Neither form accepts parameters. In string context, it returns 'YYYY-MM-DD'. In numeric context (such as CURRENT_DATE + 0), it returns YYYYMMDD.
Practical Example
Suppose your marketing team wants to check which members in demo_customers joined today or within the past 7 days.
SELECT
customer_id,
full_name,
signup_date,
CURRENT_DATE AS report_date
FROM demo_customers
WHERE signup_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY);
| customer_id | full_name | signup_date | report_date |
|---|---|---|---|
| 401 | Amina Chowdhury | 2026-05-10 | 2026-05-12 |
| 402 | Lucas Meyer | 2026-05-12 | 2026-05-12 |
Both CURRENT_DATE and CURRENT_DATE() produce the exact same DATE value inside the query and remain constant for all rows in a single statement.
Common Mistakes & NULL Behavior
Avoid these frequent errors when writing queries with CURRENT_DATE():
- Does not fail on
NULLrow data: SinceCURRENT_DATE()takes no input arguments,NULLvalues in other columns never turnCURRENT_DATE()intoNULL. - No fractional seconds argument: Writing
CURRENT_DATE(3)triggers a syntax error becauseDATEvalues store no time or microseconds. - Confusing
CURRENT_DATEwithCURRENT_TIMESTAMP:CURRENT_DATEdrops the clock time. UseCURRENT_TIMESTAMPwhen you need hours, minutes, and seconds. - Numeric addition pitfalls: Writing
CURRENT_DATE + 1adds1in integer math (20260512 + 1 = 20260513), which breaks on month boundaries like20260531 + 1 = 20260532. Always useINTERVAL 1 DAYinstead.
Frequently Asked Questions
Should I write CURRENT_DATE or CURRENT_DATE()?
Both work identically in MySQL. Writing CURRENT_DATE without parentheses follows the ANSI SQL standard and works in PostgreSQL and SQLite as well.
Does CURRENT_DATE change if a long query runs past midnight?
No. MySQL evaluates CURRENT_DATE once at the start of statement execution, so every row in the result sees the same date.
How do I test CURRENT_DATE in UTC regardless of server location?
Run SET time_zone = '+00:00'; on your connection before selecting CURRENT_DATE, or convert UTC_TIMESTAMP() with DATE(UTC_TIMESTAMP()).
Unlock Your
Full Potential.
Sign in to track your learning journey, earn industry-recognized certificates, and join our elite developer community.
Quick Access With
Try it Yourself
Experiment with the code from this lesson in our interactive playground.