X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AE8A714B280B for ; Tue, 10 Aug 2004 04:57:39 -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 79599-01 for ; Tue, 10 Aug 2004 07:57:28 +0000 (GMT) Received: from houston.familyhealth.com.au (fhnet.arach.net.au [203.22.197.21]) by svr1.postgresql.org (Postfix) with ESMTP id 8311F14B2806 for ; Tue, 10 Aug 2004 04:57:26 -0300 (ADT) Received: from [192.168.0.40] (work-40.internal [192.168.0.40]) by houston.familyhealth.com.au (8.12.9p1/8.12.9) with ESMTP id i7A7v8Ui062161; Tue, 10 Aug 2004 15:57:08 +0800 (WST) (envelope-from chriskl@familyhealth.com.au) Message-ID: <4118803E.9080307@familyhealth.com.au> Date: Tue, 10 Aug 2004 15:58:54 +0800 From: Christopher Kings-Lynne User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: azah azah Cc: pgsql-php@postgresql.org Subject: Re: No to_days format in postgresql? References: <235b1a280408100044251eca07@mail.gmail.com> In-Reply-To: <235b1a280408100044251eca07@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/13 X-Sequence-Number: 2901 > I really need help to convert to_days from mysql to postgresql as below: > > TO_DAYS(now()) - TO_DAYS(timecheck) <=7 > > how can i do it in postgresql? (timecheck - interval '7 days') <= current_timestamp Chris