Forum Moderators: coopster

Message Too Old, No Replies

is it possible to compare 2 dates?

         

fukchai2000

9:55 am on Oct 27, 2004 (gmt 0)

10+ Year Member



we have this 2 different dates,
$a = 2004 - 12 - 12 and $b = 2004 - 12 - 30

is possible for us in php to do:
if ($a < $b) // possible to do this?
{}

thanks

mincklerstraat

10:19 am on Oct 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You know, if you use 0 to make two-digit day and month numbers, it *might* just work like this without doing anything special. Otherwise, you'll have to check out the various date & time functions - [php.net...] . See if you can get the timestamp out of them with
strtotime()
, and compare timestamps.