Need Help with the time

closed account (zU5NwA7f)
I want to convert from Standard time to Military time (24 hours). Since I asking the user to input the military time first. And now I ask the user for min of their talking on the cell phone. (I got the part that convert from Min into Hour and Min) but now here is the problem. If I add the two together how can i prevent not to go over 24?

for example:

Let User input 22.00
Min is 300 <== 5 hour and 0 min

total is 27.00 hours
(This does include the day)

why prevent
closed account (zU5NwA7f)
If you dont prevent it. It count as a new day. But I dont want it to go to the next day.
Why not subtract 24 if hours > 24.

I think I might do the whole calculation in minutes. Then convert the result into days, hours and minutes.
Topic archived. No new replies allowed.