calculate the differnance between 2 time
Posted: Mon May 25, 2009 7:18 am
Code: Select all
$diff_time=strtotime($time1)-strtotime($time2);
//$diff_time send time in seconds
echo $diff_time;A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$diff_time=strtotime($time1)-strtotime($time2);
//$diff_time send time in seconds
echo $diff_time;Code: Select all
$resullt = $result / 60; // in minutes
$result = $result / 60; // the above result, in hours
$result = $result / 24; // in days