From: Brett Dikeman <brett@cloud9.net>
To: Tomasz Myrta <jasiek@klaster.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: interval conversion
Date: Thu, 28 Aug 2003 11:45:11 -0400 (EDT)
Message-ID: <64358.63.142.161.101.1062085511.squirrel@frank.mercea.net> (raw)
In-Reply-To: <3F4E1449.5040807@klaster.net>
References: <61031.63.142.161.101.1062077015.squirrel@frank.mercea.net>
<3F4E1449.5040807@klaster.net>
>> 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
[slaps head] I swear, I studied the date/time sections of the manual for quite
some time...really...Siiiigh :-)
Thanks Tomasz!
Brett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: brett@cloud9.net, jasiek@klaster.net
Subject: Re: interval conversion
In-Reply-To: <64358.63.142.161.101.1062085511.squirrel@frank.mercea.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox