PostgreSQL 18 reference · Date and Time Functions
PostgreSQL CURRENT_DATE Function
Return today's date (in the session's time zone) as a date with no time part. It's written without parentheses.
PostgreSQL 18
Syntax
current_date
Return value
date.
Examples
SELECT current_date = now()::date AS same_day;
Output
same_day ---------- t (1 row)
Run this on your computer — see “Get Started” for setup.
SELECT name, (DATE '2026-10-22' - hire_date) / 365 AS years
FROM employees
LIMIT 3;
Output
name | years -------------+------- Sofia Reyes | 8 Omar Haddad | 8 Mei Chen | 7 (3 rows)
Run this on your computer — see “Get Started” for setup.
In other languages
DATE()· SQLite
Related
NOW()· Return the current date and time with time zone, fixed at the start of the transaction. current_timestamp is the same.AGE()· Subtract dates and return a 'symbolic' interval in years, months and days. With one argument it counts from today.MAKE_DATE()· Build a date from year, month and day numbers. make_timestamp() and make_time() do the same for other types.- SQL Date Functions · tutorial