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

Re: interval to seconds conversion. How?

From: Robby Russell <robby(at)planetargon(dot)com>
To: Denis Zaitsev <zzz(at)anda(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: interval to seconds conversion. How?
Date: 2004-10-27 22:45:14
Message-ID: 1098917114.4435.39.camel@vacant (view raw or flat)
Thread:
Lists: pgsql-general
On Thu, 2004-10-28 at 04:08 +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.
> 
> Thanks in advance.
> 

SELECT extract(epoch FROM n);

n = interval

-Robby

-- 
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | robby(at)planetargon(dot)com
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
* --- Now supporting PHP5 and PHP4 ---
****************************************/

In response to

pgsql-general by date

Next:From: Thomas HallgrenDate: 2004-10-27 22:48:51
Subject: Re: Reasoning behind process instead of thread based
Previous:From: Tom LaneDate: 2004-10-27 22:44:29
Subject: Re: Question Regarding Locks

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