Date data type problem

From: Date: Mon, 15 Jan 2001 21:15:38 +0000
Subject: Date data type problem
Groups: php.general 
Request: Send a blank email to php-general+get-34591@lists.php.net to get a copy of this message
Hi people, I have tried to compare 2 date values to see if one come before another using the sniplet below: if ($date1 < $date2) { do something }else{ ....... } while $date1 is in "yyyymmdd" format but $date2 is in "yyyy-mm-dd" formate because I get value of $date2 from a "date" data type field from a table. Can I use this "yyyy-mm-dd" to compare with value from another date variabile in the "yyyymmdd" format? If not possible, How do I make both of them to be in the same format? cheers Jack jacky@activelifestyle.com "There is nothing more rewarding than reaching the goal you set for yourself"

« previous php.general (#34591) next »