Skip site navigation (1) Skip section navigation (2)

Re: interval to seconds conversion. How?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: interval to seconds conversion. How?
Date: 2004-10-27 22:52:28
Message-ID: 20041027225227.GA97676@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-general
On Thu, Oct 28, 2004 at 04:08:53AM +0600, Denis Zaitsev wrote:
> How can I calculate the number of second in some interval?  Neither
> the secods part, nor the seconds after midnight...  Just the full
> quantity of the seconds.  I haven't find any function.

test=> SELECT extract(epoch FROM '5 hours 42 minutes 35 seconds'::INTERVAL);
 date_part 
-----------
     20555

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

pgsql-general by date

Next:From: Tom LaneDate: 2004-10-27 22:59:39
Subject: Re: Reasoning behind process instead of thread based
Previous:From: Thomas HallgrenDate: 2004-10-27 22:48:51
Subject: Re: Reasoning behind process instead of thread based

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group