X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7CC3DD842F for ; Tue, 18 Oct 2005 16:38:57 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61791-09 for ; Tue, 18 Oct 2005 19:38:54 +0000 (GMT) Received: from TWMAIL.ESNCC.COM (static-66-173-159-28.t1.cavtel.net [66.173.159.28]) by svr1.postgresql.org (Postfix) with ESMTP id 1B2FAD82C2 for ; Tue, 18 Oct 2005 16:38:54 -0300 (ADT) Received: from spawar2i8uvlb9 ([150.125.117.63]) by TWMAIL.ESNCC.COM with Microsoft SMTPSVC(5.0.2195.6713); Tue, 18 Oct 2005 15:38:55 -0400 From: "Lane Van Ingen" To: Subject: What Am I Doing Wrong? Date: Tue, 18 Oct 2005 15:38:54 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181 Importance: Normal X-OriginalArrivalTime: 18 Oct 2005 19:38:55.0330 (UTC) FILETIME=[9378CC20:01C5D41B] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.056 required=5 tests=[AWL=0.006, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/188 X-Sequence-Number: 23041 I have been trying to subtract two timestamps from each other to determine the difference between the two timestamps (current time and a past timestamp called 'updated_time') IN SECONDS, but no luck. The trouble I am having is getting the first timestamp, representing the current time, to translate to seconds; have tried different commands (now(), localtimestamp, current_timestamp, etc) What am I doing wrong? Sample statement and error message is below: ------------------------------------------ select EXTRACT(EPOCH from TIMESTAMP current_timestamp) - EXTRACT(EPOCH from TIMESTAMP updated_time) ::integer ERROR: syntax error at or near "current_timestamp" at character 37