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 A56A552876 for ; Mon, 23 May 2005 08:03:55 -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 39849-04 for ; Mon, 23 May 2005 11:03:49 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id 40AC152864 for ; Mon, 23 May 2005 08:03:47 -0300 (ADT) Received: (qmail-ldap/ctrl 50670 invoked from network); 23 May 2005 11:04:39 -0000 Received: from unknown (HELO jupiter.sonorys.at) ([213.235.243.42]) (envelope-sender ) by mx-00.sil.at (qmail-ldap-1.03) with SMTP for ; 23 May 2005 11:04:39 -0000 Received: from neptun.sonorys.at (neptun.sonorys.at [172.24.1.17]) by jupiter.sonorys.at (8.11.7+Sun/8.11.7) with ESMTP id j4NB4c106847; Mon, 23 May 2005 13:04:38 +0200 (MEST) Received: by neptun.sonorys.at with Internet Mail Service (5.5.2653.19) id <2JD5WVTV>; Mon, 23 May 2005 13:04:38 +0200 Message-ID: From: =?ISO-8859-1?Q?K=D6PFERL_Robert?= To: "'palanivel.kumaran@scandent.com'" , pgsql-sql@postgresql.org Subject: Re: Need clarification Date: Mon, 23 May 2005 13:04:30 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="ISO-8859-1" X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200505/184 X-Sequence-Number: 21497 Your're looking for the interval data type. timestamp - timestamp or date - date can be compared with interval CURRENT_TIMESTAMP - '4d'::interval => 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 your | message can get through to the mailing list cleanly |