$today = date('Y-m-d H:i:s'); // get date SQL format
$today = date('Y-m-d H:i:s', strtotime($today)); // get date SQL format¨
$today = new DateTime($today);
$compare = new DateTime($row['date']);
$interval = date_diff($today, $compare);
echo $interval->format("%H") .'<br>';
echo $interval->format("%i") .'<br>';
echo $interval->format("%s") .'<br>';
die();
Something is very wrong, i want the time difference between a post in my SQL database and NowTime
$row['date']
is 2013-03-25 14:22:53 inserted as datetime in my table, for some reason i get a odd downcounting output?