pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedDAte use in For loop
2+ messages / 2 participants
[nested] [flat]
* DAte use in For loop
@ 2003-05-01 11:30 Ramesh PAtel <ramesh@banas.guj.nic.in>
0 siblings, 1 reply; 2+ messages in thread
From: Ramesh PAtel @ 2003-05-01 11:30 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: DAte use in For loop
@ 2003-05-01 20:11 Jean-Michel Chabanne <jeanmichel.chabanne@free.fr>
parent: Ramesh PAtel <ramesh@banas.guj.nic.in>
0 siblings, 0 replies; 2+ messages in thread
From: Jean-Michel Chabanne @ 2003-05-01 20:11 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-05-01 20:11 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-01 11:30 DAte use in For loop Ramesh PAtel <ramesh@banas.guj.nic.in>
2003-05-01 20:11 ` Jean-Michel Chabanne <jeanmichel.chabanne@free.fr>
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