From: Rod Taylor <rbt@rbt.ca>
To: A.M. <agentm@cmu.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: timestamp output as seconds since epoch?
Date: 26 Feb 2003 20:30:19 -0500
Message-ID: <1046309418.88663.8.camel@jester> (raw)
In-Reply-To: <DB35FD78-49F0-11D7-A1A6-0030657192DA@cmu.edu>
References: <DB35FD78-49F0-11D7-A1A6-0030657192DA@cmu.edu>
select extract('epoch' from current_timestamp);
On Wed, 2003-02-26 at 20:14, A.M. wrote:
> I need to grab the pgsql timestamp as an integer (seconds since epoch)
> in order to compare the dates programmatically later on. What I'd like
> is:
> SELECT CAST('12/12/2004 4:50:45.3' AS TIMESTAMP)::INT8;
> The docs talk alot about date input but only discuss the 4 SET
> regionalized date output methods. Thanks!
> ><><><><><><><><><
> AgentM
> agentm@cmu.edu
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
--
Rod Taylor <rbt@rbt.ca>
PGP Key: http://www.rbt.ca/rbtpub.ascAttachments:
signature.asc (application/pgp-signature, 186B) download
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: rbt@rbt.ca, agentm@cmu.edu
Subject: Re: timestamp output as seconds since epoch?
In-Reply-To: <1046309418.88663.8.camel@jester>
* 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