I have following
$var = \"2010-01-21 00:00:00.0\"
I\'d like to compare this date against today\'s date (i.e. I\'d like to know if this
$toBeComparedDate = '2014-08-12'; $today = (new DateTime())->format('Y-m-d'); //use format whatever you are using $expiry = (new DateTime($toBeComparedDate))->format('Y-m-d'); var_dump(strtotime($today) > strtotime($expiry)); //false or true