I'm trying to get the difference between two datetimes and return it as a
datetime. I've found examples using
diff but I can't seem to get it right.
$timein = date("Y-m-d H:i:s"); $timeout = date("Y-m-d 20:00:00"); $totaltime = $timein->diff($timeout);
0000-00-00 00:00:00 to my DB. Is this because I'm not formatting my totaltime variable?