- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$dat = new DateTime();
$date_format = "d.m.Y H:i:s";
$dat = $dat->format($date_format);
$che = date($date_format, strtotime('31.05.2013 23:59:59'));
echo $dat.'<br>';
echo $che;
if($dat > $che)
{
echo($dat.' > '.$che);
}else{
echo($dat.' < '.$che);
}