Re: interval conversion - Mailing list pgsql-sql

From Tomasz Myrta
Subject Re: interval conversion
Date
Msg-id 3F4E1449.5040807@klaster.net
Whole thread Raw
In response to interval conversion  ("Brett Dikeman" <brett@cloud9.net>)
Responses Re: interval conversion
List pgsql-sql
> Hello all!
> 
> I have a possibly stupid question- I'm doing some time calculations yielding
> intervals, and for my purposes I need to convert the interval(say, "1 day 8
> hours") into (floating point) hours.  While there's a plethora of handy
> date_extract functionality and the like, I need a conversion.
> 
> Any suggestions on how to accompish this?  Simpler the better, of course.

extract(epoch from some_interval)/3600

Regards,
Tomasz Myrta



pgsql-sql by date:

Previous
From: "Brett Dikeman"
Date:
Subject: interval conversion
Next
From: "Chris Faulkner"
Date:
Subject: Re: length of array