X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 79B7F5688E for ; Thu, 17 Mar 2005 18:33:01 +0000 (GMT) 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 30866-04 for ; Thu, 17 Mar 2005 18:32:56 +0000 (GMT) Received: from brmea-mail-4.sun.com (brmea-mail-4.Sun.COM [192.18.98.36]) by svr1.postgresql.org (Postfix) with ESMTP id 07AB7568B3 for ; Thu, 17 Mar 2005 18:32:54 +0000 (GMT) Received: from phys-hanwk-1 ([129.149.2.111]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id j2HIWsX8023752 for ; Thu, 17 Mar 2005 11:32:54 -0700 (MST) Received: from conversion-daemon.hanwk-mail1.sfbay.sun.com by hanwk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IDI00F01E1IRQ@hanwk-mail1.sfbay.sun.com> (original mail from Ashok.Agrawal@Sun.COM) for pgsql-sql@postgresql.org; Thu, 17 Mar 2005 10:32:54 -0800 (PST) Received: from Sun.COM (sr2-unwk-11.SFBay.Sun.COM [129.149.2.70]) by hanwk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0IDI008K4E6TZ1@hanwk-mail1.sfbay.sun.com> for pgsql-sql@postgresql.org; Thu, 17 Mar 2005 10:32:54 -0800 (PST) Date: Thu, 17 Mar 2005 10:32:53 -0800 From: Ashok Agrawal Subject: date subtraction To: pgsql-sql@postgresql.org Reply-To: Ashok.Agrawal@Sun.COM Message-id: <4239CD55.305@Sun.COM> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20041214 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/268 X-Sequence-Number: 20747 I need to do date calculation similar to oracle in postgres. like sysdate - creation_date of the record which returns no of days in oracle which you can convert to hours or second by multiplying by 60 or 3600. How do i achieve this in postgres. Thanks Ashok