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 10B3752894; Mon, 23 May 2005 08:24:41 -0300 (ADT) 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 42337-07; Mon, 23 May 2005 11:24:36 +0000 (GMT) Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by svr1.postgresql.org (Postfix) with ESMTP id DD3205288B; Mon, 23 May 2005 08:24:34 -0300 (ADT) Received: from snchnm01.scandentgroup.com (mail.scandentgroup.com [203.101.64.100]) by svr2.postgresql.org (Postfix) with SMTP id 7CFEEF0A7F; Mon, 23 May 2005 12:21:59 +0100 (BST) Subject: Re: Need clarification To: =?ISO-8859-1?Q?K=D6PFERL_Robert?= Cc: pgsql-sql@postgresql.org, pgsql-sql-owner@postgresql.org X-Mailer: Lotus Notes Release 5.0.8 June 18, 2001 Message-ID: From: palanivel.kumaran@scandent.com Date: Mon, 23 May 2005 16:31:55 +0530 X-MIMETrack: Serialize by Router on SNCHNM01/Scandent(Release 6.5|September 26, 2003) at 05/23/2005 04:47:06 PM MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.178 tagged_above=0 required=5 tests=NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200505/186 X-Sequence-Number: 21499 Sorry, I didn't get ur point...please, tell me exact query to extract t= he rows from a table A which contains a date field named DTE whose differ= ence is 30 days as compared to the current date... Thanks & Regards Palanivel P.K = K=D6PFERL Robert = , pgsql-sql@postgresql.org Sent by: cc: = pgsql-sql-owner@pos Subject: Re: [SQL] Ne= ed clarification tgresql.org = = = 05/23/2005 04:34 PM = = = Your're looking for the interval data type. timestamp - timestamp or date - date can be compared with interval CURRENT_TIMESTAMP - '4d'::interval =3D> today - 4 days |-----Original Message----- |From: palanivel.kumaran@scandent.com |[mailto:palanivel.kumaran@scandent.com] |Sent: Montag, 23. Mai 2005 11:52 |To: pgsql-sql@postgresql.org |Subject: [SQL] Need clarification | | | | | | |how can retrieve rows where the datedifference is more than 30... |assume there exists a field named 'datacreated' which is of |type 'date'. I |need to compare it with the current date and need to extract |the matched |rows.... | |thanks in advance. | |Palanivel | |Important Email Information :- The information in this email is |confidential and may be legally privileged. It is |intended solely for |the addressee. Access to this email by anyone else is |unauthorized. If |you are not the intended recipient, any disclosure, copying, |distribution or |any action taken or omitted to be taken in reliance on it, is |prohibited |and may be unlawful. If you are not the intended addressee |please contact |the sender and dispose of this e-mail immediately. | | |---------------------------(end of |broadcast)--------------------------- |TIP 3: if posting/reading through Usenet, please send an appropriate | subscribe-nomail command to majordomo@postgresql.org so that you= r | message can get through to the mailing list cleanly | ---------------------------(end of broadcast)--------------------------= - TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your= message can get through to the mailing list cleanly Important Email Information :- The information in this email is confidential and may be legally privileged. It is intended solely= for the addressee. Access to this email by anyone else is unauthorized= . If you are not the intended recipient, any disclosure, copying, distributi= on or any action taken or omitted to be taken in reliance on it, is prohibite= d and may be unlawful. If you are not the intended addressee please conta= ct the sender and dispose of this e-mail immediately.=