timestamp output as seconds since epoch?

From: "A(dot)M(dot)" <agentm(at)cmu(dot)edu>
To: pgsql-sql(at)postgresql(dot)org
Subject: timestamp output as seconds since epoch?
Date: 2003-02-27 01:14:44
Message-ID: DB35FD78-49F0-11D7-A1A6-0030657192DA@cmu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)cmu(dot)edu

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rod Taylor 2003-02-27 01:30:19 Re: timestamp output as seconds since epoch?
Previous Message Grignon Etienne 2003-02-26 22:46:54 pgsql problem