i try to compare 2 datetime and get the different in minutes and second and after i refer this topic How to get time difference in minutes in PHP yes that code can show the
$minutes = round(abs($to_time - $from_time) / 60,2); $seconds = abs($to_time - $from_time) % 60; echo "$minutes minute, $seconds seconds";