Course
Simulator
More
Premium
Log in
PostgreSQL Function Reference
Functions
AGE
AGE
Returns the difference between two timestamps as an interval.
PostgreSQL 17.5
AGE
(
timestamp
,
timestamp
)
timestamp1
The later timestamp
timestamp2
The earlier timestamp
Examples
PostgreSQL 17.5
SELECT
AGE
(
'2022-12-05'
,
'2012-06-12'
)