X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0994B474E42 for ; Wed, 26 Feb 2003 20:17:11 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 74710-06 for ; Wed, 26 Feb 2003 20:17:00 -0500 (EST) Received: from smtp5.andrew.cmu.edu (SMTP5.andrew.cmu.edu [128.2.10.85]) by postgresql.org (Postfix) with ESMTP id 1DC1F474E5C for ; Wed, 26 Feb 2003 20:17:00 -0500 (EST) Received: from cmu.edu (AXMINSTER.WV.CC.cmu.edu [128.2.67.79]) (user=amcauley mech=PLAIN (0 bits)) by smtp5.andrew.cmu.edu (8.12.7.Beta1/8.12.3.Beta2) with ESMTP id h1R1H2RJ002584 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Wed, 26 Feb 2003 20:17:03 -0500 Date: Wed, 26 Feb 2003 20:14:44 -0500 Mime-Version: 1.0 (Apple Message framework v551) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: timestamp output as seconds since epoch? From: "A.M." To: pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit Message-Id: X-Mailer: Apple Mail (2.551) X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/592 X-Sequence-Number: 11990 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