# Converting Time Difference to Minutes: A Problem for Idiots

• King
In summary, the conversation is about converting the difference between two times on a 24-hour clock into minutes. The formula used is (hours*100)/100 * 60, with the explanation being that hours are represented as "hours*100" on a 24-hour clock. However, this is not necessary and can be simplified to just (hours*60). The conversation also includes a discussion on how to calculate the difference between times and how to convert it into minutes. The reason for using the formula in programming is also mentioned.

#### King

Hey all,

I have a quick question about converting a difference between 2 times into minutes.
I am modelling a 24 hour clock. The time 900 represents the time 09:00 and 1500 represents the time 15:00. If I subtract the two I get a difference of 600. If I want to convert this to minutes I would write (600/100)*60. There's my answer, but I can't seem to get my head round what (600/100) is doing. Why do I need to divide it by 100?

This question was brought to you by an idiot.

Because you represent hours as "hours*100", so to get "hours" back you need to divide by 100.

12 and 24 hour clocks use the format: HH:MM, where H is an hour digit and M is a minute digit. Don't subtract the two times like that.
15:00 - 09:00 = 6:00
Six hours.
There's 60 minutes in an hour, so multiply this by 60 minutes per hour.

$$6 hour*\frac{60 minute}{1 hour} = 360 minutes$$

You don't need to divide by 100.

Let's say you were looking at the difference between 7:00 and 8:45. Since there's 60 minutes in an hour, you can look at it like this.

You need 60 minutes to reach 8:00 from 7:00. Then you need an additional 45 minutes to reach 8:45.

Look at the difference between 7:00 and 10:30 now.
You need 3 hours (10-7) and 30 minutes (30-0) to reach the end time. To get this into minutes, just multiply the 3 hours by 60 minutes per hour = (180 minutes), and add to 30 minutes to obtain 210 minutes.

Hope this helps. Remember, there are no stupid questions; only answers can be stupid.

Thanks a lot for the answers. Makes sense now The reason I had to do it like that however is for computer programming. Unfortunately coding a program to understand HH:MM is more complicated than doing HHMM-HHMM, though the former is so much easier to do in our heads :tongue: