On 01-12-2011 02:17, Floyd Resler wrote:
On Nov 30, 2011, at 5:04 PM, Matijn Woudt wrote:
On Wed, Nov 30, 2011 at 11:00 PM, Marc Frommmarc.fr...@wwu.edu wrote:
I'm puzzled why the if statement executes as true when the first date
(job_closedate) is not less than the second date (now).
The
On 01-12-2011 02:17, Floyd Resler wrote:
On Nov 30, 2011, at 5:04 PM, Matijn Woudt wrote:
On Wed, Nov 30, 2011 at 11:00 PM, Marc Frommmarc.fr...@wwu.edu wrote:
I'm puzzled why the if statement executes as true when the first date
(job_closedate) is not less than the second date (now).
The
On 01-12-2011 02:17, Floyd Resler wrote:
On Nov 30, 2011, at 5:04 PM, Matijn Woudt wrote:
On Wed, Nov 30, 2011 at 11:00 PM, Marc Frommmarc.fr...@wwu.edu wrote:
I'm puzzled why the if statement executes as true when the first date
(job_closedate) is not less than the second date (now).
The
Thanks. I'm stuck using 5.1.6. Matijn reply worked by using the unix timestamp.
-Original Message-
From: Maciek Sokolewicz [mailto:tula...@gmail.com] On Behalf Of Maciek
Sokolewicz
Sent: Thursday, December 01, 2011 12:57 PM
To: Marc Fromm
Cc: Floyd Resler
Subject: Re: [PHP] compare dates
I'm puzzled why the if statement executes as true when the first date
(job_closedate) is not less than the second date (now).
The if statement claims that 12/02/2011 is less than 11/30/2011.
if (date(m/d/Y,strtotime($jobs_closedate)) =
date(m/d/Y,strtotime(now))){
On Wed, Nov 30, 2011 at 11:00 PM, Marc Fromm marc.fr...@wwu.edu wrote:
I'm puzzled why the if statement executes as true when the first date
(job_closedate) is not less than the second date (now).
The if statement claims that 12/02/2011 is less than 11/30/2011.
if
On Nov 30, 2011, at 5:04 PM, Matijn Woudt wrote:
On Wed, Nov 30, 2011 at 11:00 PM, Marc Fromm marc.fr...@wwu.edu wrote:
I'm puzzled why the if statement executes as true when the first date
(job_closedate) is not less than the second date (now).
The if statement claims that 12/02/2011 is
Hi,
How can I compare two dates with PHP, to see if one date occurred before the
other?
Thanks for your help
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
September 2003 10:52
To: [EMAIL PROTECTED]
Subject: [PHP] Compare dates
Hi,
How can I compare two dates with PHP, to see if one date occurred before the
other?
Thanks for your help
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If you
How can I compare two dates with PHP, to see if one date occurred before
the other?
probably not the best way but:
if the date is formated like this 20030929 (today) 20030928 (yesterday)
I think it is quite easy:
if ( (int)$today (int)$yesterday )
or perhaps like this:
if ( strcmp($today,
Shaun wrote:
How can I compare two dates with PHP, to see if one date occurred before the
other?
Convert them to a timestamps (strtotime()), then just compare them:
$date1 = 'september 10th 2003';
$date2 = 'september 20th 2003';
$date1_ts = strtotime($date1);
$date2_ts = strtotime($date2);
Hi,
I have two dates retrieved from a database stored as variables: $mindate and
$maxdate, how can i compare the two with PHP so i can loop and increment
i.e.
while($mindate $maxdate){
//do some stuff
$mindate++;
}
Thanks for your help
--
PHP General Mailing List (http://www.php.net/)
12 matches
Mail list logo