pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jean-Michel Chabanne <jeanmichel.chabanne@free.fr>
To: pgsql-admin@postgresql.org
Subject: Re: DAte  use in For loop
Date: Thu, 01 May 2003 22:11:48 +0200
Message-ID: <b8rv1j$2vnp$1@news.hub.org> (raw)
In-Reply-To: <3EB152E3.4904.1668B35@localhost>
References: <3EB152E3.4904.1668B35@localhost>

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




view thread (2+ messages)

Message-ID: <b8rv1j$2vnp$1@news.hub.org>
Permalink:  ../b8rv1j$2vnp$1@news.hub.org/
Also on:    postgresql.org/message-id/b8rv1j$2vnp$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jeanmichel.chabanne@free.fr
  Subject: Re: DAte  use in For loop
  In-Reply-To: <b8rv1j$2vnp$1@news.hub.org>
  References: <3EB152E3.4904.1668B35@localhost> <b8rv1j$2vnp$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox