age ( timestamp, timestamp ) → intervalSubtract arguments, producing a “symbolic” result that uses years and months, rather than just days
age(timestamp '2001-04-10', timestamp '1957-06-13') → 43 years 9 mons 27 days
Functions / Date/Time Functions And Operators
Subtract arguments, producing a “symbolic” result that uses years and months, rather than just days
Reading PG 18current·documented in 27 of 27 versions, 7.1 to 20
age ( timestamp, timestamp ) → intervalSubtract arguments, producing a “symbolic” result that uses years and months, rather than just days
age(timestamp '2001-04-10', timestamp '1957-06-13') → 43 years 9 mons 27 days
age ( timestamp ) → intervalSubtract argument from
current_date (at midnight)age(timestamp '1957-06-13') → 62 years 6 mons 10 days
age ( xid ) → integerReturns the number of transactions between the supplied transaction id and the current transaction counter.
Definition snapshot: b7bd9cda · English manual source