Thanks for the reply.

Every example on comparing dates in PHP that I found uses the "strtotime" 
function which I am using.  What other type can I use?

When is this example below supposed to work?

// your first date coming from a mysql database (date fields)
$dateA = '2008-03-01 13:34';
// your second date coming from a mysql database (date fields)
$dateB = '2007-04-14 15:23';
if(strtotime<>($dateA) > 
    // bla bla


From: Serge Fonville []
Sent: Thursday, January 03, 2013 2:05 PM
To: Marc Fromm
Subject: Re: [PHP] date problem


date returns a string

You should compare a different type for bigger/smaller than


Kind regards/met vriendelijke groet,

Serge Fonville

Convince Microsoft!
They need to add TRUNCATE PARTITION in SQL Server

2013/1/3 Marc Fromm <<>>
I am comparing to dates.

$jes = 01/03/2012;

if ( date("m/d/Y", strtotime($jes)) < date("m/d/Y", strtotime(WSOFFBEGIN)) )
        $error = " MUST begin after " . WSOFFBEGIN . "\n";

I cannot figure out why the $error is being assigned inside the if statement, 
since the statement should be false. 01/03/2012 is not less than 09/16/2012.


Reply via email to