AGE
Example
Section titled “Example”SELECT AGE(TIMESTAMP '2000-01-01');Output
Section titled “Output”age------------------21 years 10 monsExplanation
Section titled “Explanation”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.