Re: date comparisions...

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

 



Hi Rich,

Thanks for your reply.

dateexpired is: 1128052800 which translates into: 2005-09-30 00:00:00

Basically, I'm just trying to figure out when the dateexpired is. IF it is
past the current date then I am erroring out and if it's under the current
date... I'm allowing the transaction.

I would assume the following:

if (2005-09-30 00:00:00 > 2005-10-07 00:00:00)

it should error out, no?

Thanks!

Aaron

> Hi aaronjw,
>
> Start with the obvious - what actually IS the value of
> $discountResult["dateexpired"]? var_dump it out and have a look. Check
> you are comparing like with like. You're also not performing a strict
> comparison, so string conversion could be going on here.
>
> The other obvious fact is that if dateexpired is less than *right
> now*, it'll always "dosomething" ! :)
>
> Cheers,
>
> Rich

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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