PDA

Click to See Complete Forum and Search --> : format total in minutes into hours and minutes


schuurke28
Mar 6th, 2001, 09:06 AM
i have to count minutes and convert them to hours and minutes, i.e.
0800
0830
0530
------
2160

2160 must become 22 hours, how do i format this?

Mar 7th, 2001, 10:16 AM
you can't really add them like that, coz for instance:

0055
0055
------+
0110 which would be 1 hour and 10 minuten, while in reality it is 1 hour and 50 minutes.

So you have to add hours and minutes seperately, then just take the minutes div 60 and add that to the hours, while minutes mod 60 is the number of minutes.