Adding and Subtracting Time ? Confused?

Here is a trick that i got from online

**Adding Times**

Follow these steps:

- Add the hours
- Add the minutes
- If the minutes are 60 or more, subtract 60 from the minutes and add 1 to hours

**Subtracting Times**

Follow these steps:

- Subtract the hours
- Subtract the minutes
- If the minutes are negative, add 60 to the minutes and subtract 1 from hours.

**Problem :**

However this trick does not work when i need to subtract:

5 PM from 12:00 PM (What happens now)

and also what should i do if i need to subtract 2AM of one day with 5 PM of the day before ?

Any tips or tricks ??

Re: Adding and Subtracting Time ? Confused?

Extend your negative-rule to hours. It is much easier in the 24h-format:

Subtract the hours

Subtract the minutes

If the minutes are negative, add 60 to the minutes and subtract 1 from hours.

If the hours are negative, add 24 to the hours and subtract 1 form the days.

AM/PM would require to study a lot of cases, just convert the times before calculating with them.

Re: Adding and Subtracting Time ? Confused?

Are you suggesting that,i should always convert am/pm to 24 hr before calculating the difference?

Re: Adding and Subtracting Time ? Confused?

That would certainly be the simplest thing to do. When you are talking about time, there is a lot of ambiguity. I interpret 12:00 PM as "noon", not "midnight" ("midnight" is 12 AM although, strictly speaking, it is incorrect to assign "AM" or "PM" to either noon or midnight. Is that what is intended? When you say "5 PM from 12:00 PM" do you mean "noon of the next day" (7+ 12= 19 hours) or "midnight" (7 hours)?

Re: Adding and Subtracting Time ? Confused?

Quote:

Is that what is intended? When you say "5 PM from 12:00 PM" do you mean "noon of the next day" (7+ 12= 19 hours) or "midnight" (7 hours)?

Noon to 5PM (Which is 5 hours)

Re: Adding and Subtracting Time ? Confused?

Yeah, but if time passes 11 AM -> 12 PM -> 1 PM -> ... -> 11 PM -> 12 AM -> 1 AM, you can imagine the mess of calculating with those numbers.