I have two times - For eg- the current time - 08:24 and date is 02/01/2013 in dd/mm/yyyy format and I have another time at 13:46 and date is 31/12/2012 . So, how can I cal
I found this is simplest way to find time difference, it always works for me
$timestamp1 = strtotime(date('Y-m-d H:i')); $timestamp2 = strtotime("2020-04-05 18:00"); $diff = abs($timestamp2 - $timestamp1)/(60*60); echo $diff;