Question: how to calculate time difference in codeigniter?
Answer: $start = new DateTime("2017-03-09 09:26:00"); $end = new DateTime("2017-03-11 09:25:00"); $interval = $start->diff($end); echo $interval->format('%h hours %i minutes %S seconds');