On 30 March 2010 11:55, Tom Lane wrote:
> I think what Mike is actually looking for is
>
> SELECT extract(epoch from interval '3 days 2 hours 34 minutes');
> date_part
> ---
> 268440
Yet better, if I define 1 hour as 3600 seconds (this is only incorrect
if the interval spans over a le
Alban Hertroys writes:
> On 30 Mar 2010, at 18:29, Mike Toews wrote:
>> I'm using 8.3, and I'm trying to work with the interval type, and I
>> can't seem to get things right. I've been all over the docs[1,2], and
>> there is no mention on how this can be done.
>>
>> While I can get:
>> SELECT '3
On 30 Mar 2010, at 18:29, Mike Toews wrote:
> I'm using 8.3, and I'm trying to work with the interval type, and I
> can't seem to get things right. I've been all over the docs[1,2], and
> there is no mention on how this can be done.
>
> While I can get:
> SELECT '3 day 2 hour 34 minute'::interval
I'm using 8.3, and I'm trying to work with the interval type, and I
can't seem to get things right. I've been all over the docs[1,2], and
there is no mention on how this can be done.
While I can get:
SELECT '3 day 2 hour 34 minute'::interval
.. how can then get the fractional hours of this time i