X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id F2085475E9D for ; Thu, 1 May 2003 16:11:42 -0400 (EDT) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 9B599475C3D for ; Thu, 1 May 2003 16:11:32 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id 7212D43A89E; Thu, 1 May 2003 16:11:32 -0400 (EDT) From: Jean-Michel Chabanne X-Newsgroups: comp.databases.postgresql.admin Subject: Re: DAte use in For loop Date: Thu, 01 May 2003 22:11:48 +0200 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 48 Message-ID: References: <3EB152E3.4904.1668B35@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 X-Accept-Language: fr, en-us, en In-Reply-To: <3EB152E3.4904.1668B35@localhost> To: pgsql-admin@postgresql.org X-Spam-Status: No, hits=-38.0 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,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/12 X-Sequence-Number: 8574 Ramesh PAtel wrote: > Hi All > > please give one help > > I want to us date variable in for loop Condition. in PHP > > But it not working Properly. > $dt='2003-04-22' ; > $to='2003-04-30'; > > FOR ( $dt=$dt; $dt > $to ; ) > { > print "XYz"; > } > > Please Help me > > and how to file date diff in Day please Help > > Ramesh Patel > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > $begin_d = mktime(2, 0, 0, 4, 22, 2003); $end_d = mktime(2, 0, 0, 4, 30, 2003); while($begin_d <= $end_d) { echo date("Y-m-d",$begin_d) . "\n"; $begin_d += 86400; } For PHP informations, look at comp.lang.php -- Jean-Michel Chabanne 77450 MONTRY (FRANCE) 48" 54' N - 2" 49' E Powered by Linux