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 EE38756A0F for ; Thu, 17 Mar 2005 12:02:24 +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 07159-01 for ; Thu, 17 Mar 2005 12:02:16 +0000 (GMT) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by svr1.postgresql.org (Postfix) with ESMTP id 109F056A28 for ; Thu, 17 Mar 2005 12:02:15 +0000 (GMT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 4.42) id 1DBtfb-000Agx-4N; Thu, 17 Mar 2005 12:00:08 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id C538F17496; Thu, 17 Mar 2005 12:02:14 +0000 (GMT) Message-ID: <423971C6.1020706@archonet.com> Date: Thu, 17 Mar 2005 12:02:14 +0000 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Terry Fielder Cc: Chandan_Kumaraiah , pgsql-sql@postgresql.org Subject: Re: query References: <2EB549AAAFEA264FA926269A5BD5E9EB146579@certsrv.satyam.com> <42396D61.6070002@ashtonwoodshomes.com> In-Reply-To: <42396D61.6070002@ashtonwoodshomes.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.061 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/238 X-Sequence-Number: 20717 Terry Fielder wrote: > now() returns a timestamp. > > Cast it to a date and then you can subtract days. e.g. > > select now()::date -1 Or CURRENT_DATE - 1 >> >> *In oracle we write sysdate-1* >> >> *For example,we write a query (select * from table1 where >> created_date>=sysdate-1).Whats its equivalent in postgre?* -- Richard Huxton Archonet Ltd