in reply to Time Totaling

What is in @row[2,4]? If it is start hour and end hour, you are adding hours to minutes in your totals as if they were the same unit of time.

To round floating point minutes to quarter-minutes, something like ((4*$minutes+0.5)|0)/4 replaces all that iffing and elsing.

Update Ahh, wasn't aware of the history cited by lestrrat. If you are tracking phone calls or web sessions you need to consider those which start before midnight and end after. Your rounding to 15 sec intervals suggest you won't see sessions of a day or more, but I don't know that's true. Adding hours to minutes suggests that you haven't yet understood the problem.

After Compline,
Zaxo