Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 35CF9633ABF for ; Wed, 14 Oct 2009 17:49:12 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 35743-09 for ; Wed, 14 Oct 2009 20:49:04 +0000 (UTC) X-Greylist: delayed 00:07:36.533664 by SQLgrey-1.7.6 Received: from forward11.yandex.ru (forward11.yandex.ru [95.108.130.93]) by mail.postgresql.org (Postfix) with ESMTP id 53CC5632CF5 for ; Wed, 14 Oct 2009 17:49:04 -0300 (ADT) Received: from webmail102.yandex.ru (webmail102.yandex.ru [95.108.130.6]) by forward11.yandex.ru (Yandex) with ESMTP id 13A9AF48C9F; Thu, 15 Oct 2009 00:41:25 +0400 (MSD) Received: from localhost (localhost.localdomain [127.0.0.1]) by webmail102.yandex.ru (Yandex) with ESMTP id E9760300242; Thu, 15 Oct 2009 00:41:24 +0400 (MSD) X-Yandex-Spam: 1 X-Yandex-Front: webmail102 X-Yandex-TimeMark: 1255552884 Received: from user-28.81.118.217.in-addr.arpa (user-28.81.118.217.in-addr.arpa [217.118.81.28]) by mail.yandex.ru with HTTP; Thu, 15 Oct 2009 00:41:24 +0400 From: msi77 To: pgsql-sql@postgresql.org,Shruthi A In-Reply-To: <6caee9520910140240u13daba93ua20637642727776e@mail.gmail.com> References: <6caee9520910140240u13daba93ua20637642727776e@mail.gmail.com> Subject: Re: How to get the previous date? MIME-Version: 1.0 Message-Id: <29871255552884@webmail102.yandex.ru> Date: Thu, 15 Oct 2009 00:41:24 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.58 tagged_above=-10 required=5 tests=BAYES_50=0.001, RCVD_IN_BL_SPAMCOP_NET=1.96, RCVD_IN_SORBS_WEB=0.619 X-Spam-Level: ** X-Archive-Number: 200910/59 X-Sequence-Number: 33258 Try this: select cast(mydate as date) -1 > 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 Почта со встроенным плеером находится здесь: http://mail.yandex.ru/promo/new/wysiwyg