Re: date problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

date returns a string

You should compare a different type for bigger/smaller than

HTH

Kind regards/met vriendelijke groet,

Serge Fonville

http://www.sergefonville.nl

Convince Microsoft!
They need to add TRUNCATE PARTITION in SQL Server
https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table


2013/1/3 Marc Fromm <Marc.Fromm@xxxxxxx>

> I am comparing to dates.
>
> define('WSOFFBEGIN','09/16/2012');
> $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.
>
> Marc
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux