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
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 Fromm 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
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 Fromm 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
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 Fromm 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
On Nov 30, 2011, at 5:04 PM, Matijn Woudt wrote:
> On Wed, Nov 30, 2011 at 11:00 PM, Marc Fromm 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 "1
On Wed, Nov 30, 2011 at 11:00 PM, Marc Fromm 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 (date("m/d/Y",strtotim
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);
if(
> 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, $
I always use Unix timestamps until I need to format it to a (what's the
word) date for presentation.
Then you can just to a if $x < $y then it happened before $y.
look for mktime(), time(), date() in the manual.
C
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: 29 Septemb
9 matches
Mail list logo