Colin, > I have a similar problem. I am trying to figure out which of two dates > is greater. Both are in the yyyy-mm-dd format. Is there any easy > function that allows this sort of comparison or am I missing something?
Treat the dates as strings not numbers: $DateOne = "2002-12-13"; $DateTwo = "2001-11-12"; if ( $DateOne <= $DateTwo ) echo "DateOne comes first"; You can do comparisons like this but don't try any 'arithmetic'! Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php