pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedtimestamp output as seconds since epoch?
2+ messages / 2 participants
[nested] [flat]
* timestamp output as seconds since epoch?
@ 2003-02-27 01:14 A.M. <agentm@cmu.edu>
2003-02-27 01:30 ` Re: timestamp output as seconds since epoch? Rod Taylor <rbt@rbt.ca>
0 siblings, 1 reply; 2+ messages in thread
From: A.M. @ 2003-02-27 01:14 UTC (permalink / raw)
To: pgsql-sql
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: timestamp output as seconds since epoch?
2003-02-27 01:14 timestamp output as seconds since epoch? A.M. <agentm@cmu.edu>
@ 2003-02-27 01:30 ` Rod Taylor <rbt@rbt.ca>
0 siblings, 0 replies; 2+ messages in thread
From: Rod Taylor @ 2003-02-27 01:30 UTC (permalink / raw)
To: A.M. <agentm@cmu.edu>; +Cc: pgsql-sql
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.asc
Attachments:
signature.asc (application/pgp-signature, 186B) download
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-02-27 01:30 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-27 01:14 timestamp output as seconds since epoch? A.M. <agentm@cmu.edu>
2003-02-27 01:30 ` Rod Taylor <rbt@rbt.ca>
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