Skip to content

AGE

SELECT AGE(TIMESTAMP '2000-01-01');
age
------------------
21 years 10 mons

In the provided example, the AGE function in PostgreSQL is used to calculate the age between the current date and the specified date, ‘2000-01-01’. The result ‘21 years 10 mons’ shows the time difference in years and months.