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

Create a free account to save this page, take notes and track your progress. Sign in

Syntax

current_date

Return value

date.

Examples

Today
SELECT current_date = now()::date AS same_day;

Output

 same_day
----------
 t
(1 row)

Run this on your computer — see “Get Started” for setup.

Subtracting dates gives days
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

Was this page helpful?