Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 3967B6340F1 for ; Wed, 14 Oct 2009 06:44:03 -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 35004-06 for ; Wed, 14 Oct 2009 09:43:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mail.postgresql.org (Postfix) with ESMTP id 6AFE3633427 for ; Wed, 14 Oct 2009 06:43:52 -0300 (ADT) Received: by ewy18 with SMTP id 18so5388239ewy.19 for ; Wed, 14 Oct 2009 02:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=k4+SzL+r1/wDuayYDa+T/CgkN6UcZQZB3QWR0XoIsy8=; b=o4Vddddzoz+BrkmjxSwuD8T5k+CwGUA0/YT8bqx2E8guTBwPvPicYN3KH6sCAnW/lA e9aqmNdHdANdPko1Ds7tMgSoKcoqzl5BHvC87HTo2LPWpTRXhTjHS52vsxZ6pT24D4Y5 fJduWzjSJEvKvKQFsuUms9rErZtxBj4vVkTl4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=DGR1aj+IP7X61BUxgzL46PT7NDnfbWkwgIxyCxjkztkb1CzXBP8dSQm4QjMw3t+56w dRIqNw9reZVqapFepq84jBeQ4ImwH5Spvnr5S27D+5qRGh7bWdOZ0pbYb9MXdNkkQezD wb/z6og2W3Ly8SFktzNY7FpGunYN4d1ifIx38= MIME-Version: 1.0 Received: by 10.210.4.13 with SMTP id 13mr10047735ebd.45.1255513431132; Wed, 14 Oct 2009 02:43:51 -0700 (PDT) In-Reply-To: <6caee9520910140240u13daba93ua20637642727776e@mail.gmail.com> References: <6caee9520910140240u13daba93ua20637642727776e@mail.gmail.com> Date: Wed, 14 Oct 2009 13:43:51 +0400 Message-ID: Subject: Re: How to get the previous date? From: Dmitriy Igrishin To: Shruthi A Cc: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=000e0ce03f1212cd240475e200ef X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200910/56 X-Sequence-Number: 33255 --000e0ce03f1212cd240475e200ef Content-Type: text/plain; charset=ISO-8859-1 Hello. current_date - 1 is the solution. 2009/10/14 Shruthi A > Hi, > > I'm using Enterprise DB PostgresPlus version 8.3. > 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 > > mydate - 1 > > but this doesnt work. > > Thanks, > Shruthi --000e0ce03f1212cd240475e200ef Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello.

current_date - 1 is the solution.

2009/10/14 Shruthi A <shruthi.iisc@gmail.com>
Hi,
=20
I'm using Enterprise DB PostgresPlus version 8.3.
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
=20
Thanks,
Shruthi

--000e0ce03f1212cd240475e200ef--