splendided
IS-IT--Management
I have 2 interval values and I need to determine the percentage of one in relation to the other. As a first thought I would expect to cast the intervals to integers and calculate the percentage...
This is what I want to do in theory
eg
('00:15:00'::interval)::integer
/
('00:30:00'::interval)::integer
* 100
I'm not able to do the conversion using casting which probably makes sense considering the storage differences etc but I am struggling to see a straightforward solution to the problem from the documentation.
I am using Postgres v8.0 and higher.
Ed