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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-general by date

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