Re: interval conversion

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: brett(at)cloud9(dot)net
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: interval conversion
Date: 2003-08-28 14:40:09
Message-ID: 3F4E1449.5040807@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Brett Dikeman 2003-08-28 15:45:11 Re: interval conversion
Previous Message Chris Faulkner 2003-08-28 14:37:55 Re: length of array