Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 54F50632CF5 for ; Wed, 14 Oct 2009 07:07:44 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 40136-09 for ; Wed, 14 Oct 2009 10:07:28 +0000 (UTC) X-Greylist: delayed 00:06:40.778161 by SQLgrey-1.7.6 Received: from renaissance-it.com (mail.renaissance-it.com [164.164.87.55]) by mail.postgresql.org (Postfix) with ESMTP id 1279A632864 for ; Wed, 14 Oct 2009 07:07:31 -0300 (ADT) Received: (qmail 5803 invoked by uid 109); 14 Oct 2009 10:02:30 -0000 Received: from 192.168.1.6 by Mailsrv (envelope-from , uid 112) with qmail-scanner-1.25st (spamassassin: 3.1.7-deb. perlscan: 1.25st. Clear:RC:1(192.168.1.6):. Processed in 0.061866 secs); 14 Oct 2009 10:02:30 -0000 Received: from unknown (HELO ramasubramanian) (ramasubramanian.g@[192.168.1.6]) (envelope-sender ) by renaissance-it.com (qmail-ldap-1.03) with SMTP for ; 14 Oct 2009 10:02:30 -0000 Message-ID: From: "ramasubramanian" To: "Shruthi A" , References: <6caee9520910140240u13daba93ua20637642727776e@mail.gmail.com> Subject: Re: How to get the previous date? Date: Wed, 14 Oct 2009 15:30:52 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01CF_01CA4CE3.509C2CE0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.002 tagged_above=-10 required=5 tests=BAYES_50=0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200910/57 X-Sequence-Number: 33256 This is a multi-part message in MIME format. ------=_NextPart_000_01CF_01CA4CE3.509C2CE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Helo Madam, Here is the query. select now()+ interval '-1 day ' Regards, ram ----- Original Message -----=20 From: Shruthi A=20 To: pgsql-sql@postgresql.org=20 Sent: Wednesday, October 14, 2009 3:10 PM Subject: [SQL] How to get the previous date? Hi,=20 I'm using Enterprise DB PostgresPlus version 8.3.=20 Is there is a simple function or command like previous_date(mydate) = which when passed a particular date, simply returns the previous date? I = tried=20 mydate - 1=20 but this doesnt work.=20 Thanks,=20 Shruthi ------=_NextPart_000_01CF_01CA4CE3.509C2CE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Helo Madam,
    Here is the = query.
select now()+ interval '-1  day = '
Regards,
ram
----- Original Message -----
From:=20 Shruthi=20 A
Sent: Wednesday, October 14, = 2009 3:10=20 PM
Subject: [SQL] How to get the = previous=20 date?

Hi,

I'm using = Enterprise DB=20 PostgresPlus version 8.3.
Is there is a simple function or command = like=20 previous_date(mydate) which when passed a particular date, simply = returns the=20 previous date? I tried

mydate - 1

but this doesnt = work.=20

Thanks,
Shruthi
------=_NextPart_000_01CF_01CA4CE3.509C2CE0--