X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C77E7475F16 for ; Thu, 1 May 2003 04:00:55 -0400 (EDT) Received: from postfix4-2.free.fr (postfix4-2.free.fr [213.228.0.176]) by postgresql.org (Postfix) with ESMTP id 33CE1475E9D for ; Thu, 1 May 2003 04:00:50 -0400 (EDT) Received: from free.fr (lns-th2-2-82-64-16-122.adsl.proxad.net [82.64.16.122]) by postfix4-2.free.fr (Postfix) with ESMTP id 67F53C112; Thu, 1 May 2003 10:00:49 +0200 (CEST) Message-ID: <3EB0D43A.8070407@free.fr> Date: Thu, 01 May 2003 10:00:58 +0200 From: Jean-Michel Chabanne User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 X-Accept-Language: fr, en-us, en MIME-Version: 1.0 To: Ramesh PAtel Cc: pgsql-admin@postgresql.org Subject: Re: Date Problem References: <3EB10DC4.30066.55AE03@localhost> In-Reply-To: <3EB10DC4.30066.55AE03@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-34.2 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES,UPPERCASE_25_50,USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/4 X-Sequence-Number: 8566 Ramesh PAtel wrote: >Hi All > >now Problem is > >I have to date From = '2003-04-01' and To='2003-05-12' >now i want to use use date butween From and To. >and each date one bye one use in query. so how to > >i increse date one bye one > >Please Help me. > >Ramesh Patel > > >---------------------------(end of broadcast)--------------------------- >TIP 4: Don't 'kill -9' the postmaster > > > > You may do this : SELECT DATE (DATE '2003-04-01' + INTERVAL '24:00:00'); or build a PL/PGSQL function as this : CREATE FUNCTION onedaymore(DATE) RETURNS DATE AS ' DECLARE olddate ALIAS FOR $1; newdate date; BEGIN newdate := olddate + INTERVAL ''24:00:00''; RETURN newdate; END; ' LANGUAGE 'plpgsql'; -- Jean-Michel Chabanne 77450 MONTRY (FRANCE) 48" 54' N - 2" 49' E Powered by Linux