Attempting rather unsuccessfully to convert something of the form
45 years 9 mons 5 days 20:28:18.886891
to a total number of months, I attempted
SELECT age(now(), timestamp '1957-06-13') / interval '1 month';
and got the error
ERROR: Unable to identify an operator '/' for types 'interval' and 'interval'
You will have to retype this query using an explicit cast
Does anyone know what interval format intervals are stored as? Is there a way
I can cast this expression to be able to find the number of months within
this interval?
Or is there a function I don't know about capable of doing this? (extracting
the total number of a specific interval from another interval)... e.g. total
number of months, total number of days...
Josh.