I would like to ask how can I check if a sample date is earlier than another specified one.
I have this:
$Monday = 1-18-2010
$enroll = 12-29-2009
$enroll = $row['enroll'];
if($enroll >= $Monday){
echo "<br>$enroll is earlier than $Monday this returns TRUE ( 1 )";
}else{
echo "<br>$Monday is earlier than $enroll this returns FALSE ( 0 )";
}
This returns: 12-29-2009 is earlier than 1-18-2010 this returns TRUE ( 1 ) - THIS IS RIGHT
But when I set $Monday = 11-23-2009, It returns: 12-29-2009 is earlier than 11-23-2009 this returns TRUE ( 1 )
It's obviously wrong. So how can I proceed with this?
Is there a way I can convert my time format from 1-18-2010 to 2010-1-18?
Thank you!