This gives hours:minutes:seconds. I'll leave it as an exercise for you to add the days calculation.$diff = $t2 - $t1; $ss = $diff % 60; $diff = ($diff - $ss) / 60; $mi = $diff % 60; $hh = ($diff - $mi) / 60; sprintf("%d:%02d:%02d" , $hh, $mi, $ss);
In reply to Re: time difference
by mifflin
in thread time difference
by swaroop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |