From: | Rod Taylor <rbt(at)rbt(dot)ca> |
---|---|
To: | "A(dot)M(dot)" <agentm(at)cmu(dot)edu> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: timestamp output as seconds since epoch? |
Date: | 2003-02-27 01:30:19 |
Message-ID: | 1046309418.88663.8.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)cmu(dot)edu
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
--
Rod Taylor <rbt(at)rbt(dot)ca>
PGP Key: http://www.rbt.ca/rbtpub.asc
From | Date | Subject | |
---|---|---|---|
Next Message | Christoph Haller | 2003-02-27 10:13:13 | Re: how can i drop a <unnamed> constraint |
Previous Message | A.M. | 2003-02-27 01:14:44 | timestamp output as seconds since epoch? |