How to convert an age interval into a decimal year number in PostgreSQL I try to convert an interval like "29 years 6 mons 22 days 21:17:52.860842" into a decimal year reprensentation like 29,55 years in PostgreSQL.
SELECT EXTRACT(EPOCH FROM INTERVAL '29 years 6 mons 22 days 21:17:52.860842')/31557600;


where 31557600 is roughly the number of seconds in a year.