in reply to Time Totaling

I'm not sure I've understood, but I guess @row[2,3] are the starting hour and minute, and @row[4,5] are the ending hour and minute. You want to get the total elapsed time, presumably in hours and minutes.

If so, don't round the minutes up to hours; multiply the hour by 60 to get minutes, add it to the minutes, then substract start from end (everything in the smallest units):

$start_total = 60*$row[2] + $row[3]; $end_total = 60*$row[4] + $row[5]; $total_time = $end_total - $start_total; # in minutes
If you want to render the $total_time as hours and minutes, use integer division and remainder by 60:
$total_hr = int($total_time/60) # $total_time >= 0 $total_min = $total_time%60;
You can then use sprintf or something to render it in a nice "hh:mm" format.

HTH