Anyone know a formula to calculate total amount of time elapsed?
Say its 09:03am and you want to find out how long of a time passed at 4:57pm.
It seems like an easy question and maybe a full day of work has shut my brain down but I can't think on a formula to calculate it.
I'm not looking for the answer but how you arrived at the answer!
math question! - calculate time
Moderator: Dictators in Training
Ganzo wrote:millitary time.
4:57pm = 16,57
09:03am = 9,03
16,57 - 9.03 = 7,54
elapsed time is 7 hrs and 54 min
not alway correct since time is base 60 not base 10.
Last edited by Phlegm on Thu Jun 01, 2006 5:25 pm, edited 1 time in total.
Convert to military time first
Next convert both times into minutes
Start Time in Minutes = Start Hour * 60 + Start Minute
End Time in Minutes = End Hour * 60 + End Minute
Get the Difference between the 2
If Start Time in Minutes > End Time in Minutes
Total difference in minutes = 1440 - Start Time in Minutes + End Time in Minutes
If End Time in Minutes > or = Start Time in Minutes
Total difference in minutes = End Time in Minutes - Start Time in Minutes
Determin the number of minutes passed
Total Minutes passed = Total Difference in Minutes MOD 60
Determin the number of hours passed
Total Hours passed = Total Difference in Minutes DIV 60
Your elapsed time
Total Elapsed time = Total Hours Passed : Total Minutes Passed
Its not quick but it will give you the time your looking for. Its the easiest way to deal with the minutes.
Next convert both times into minutes
Start Time in Minutes = Start Hour * 60 + Start Minute
End Time in Minutes = End Hour * 60 + End Minute
Get the Difference between the 2
If Start Time in Minutes > End Time in Minutes
Total difference in minutes = 1440 - Start Time in Minutes + End Time in Minutes
If End Time in Minutes > or = Start Time in Minutes
Total difference in minutes = End Time in Minutes - Start Time in Minutes
Determin the number of minutes passed
Total Minutes passed = Total Difference in Minutes MOD 60
Determin the number of hours passed
Total Hours passed = Total Difference in Minutes DIV 60
Your elapsed time
Total Elapsed time = Total Hours Passed : Total Minutes Passed
Its not quick but it will give you the time your looking for. Its the easiest way to deal with the minutes.
For to win one hundred victories in one hundred battles is not the acme of skill. To subdue the enemy without fighting is the acme of skill.
The easiest way to find the time is by adding instead of subtracting.
For instance: time elapsed between 3:48 am and 7:25 pm:
12 minutes to 4 am.
15 hours between 4 am to 7 pm.
25 minutes between 7 pm to 7:25 pm.
add them up 15 hrs+25minutes+12 minutes = 15:37 is the time elapsed.
By adding you don't have to worry about the converting.
For instance: time elapsed between 3:48 am and 7:25 pm:
12 minutes to 4 am.
15 hours between 4 am to 7 pm.
25 minutes between 7 pm to 7:25 pm.
add them up 15 hrs+25minutes+12 minutes = 15:37 is the time elapsed.
By adding you don't have to worry about the converting.
? = ((AE+12)-AS)
AE = Absolute End
AS = Absolute Start
Convert the minutes to an absolute by dividing them by 60. This will return a number easier to work with.
I.E.
9:03 would convert to 9.05 (3 divide 60 = 0.05)
4:57 would convert to 4.95 (57 divide 60 = 0.95)
If you take these numbers and this formula you can find the absolute difference.
? = ((4.95+12)-9.05)
? = 7.9
Take the decimal and convert it back by multiplying 60 by the decimal in % form.
0.9 = 90% (60*90%=54)
Elapsed Time = 7:54
Example was easier done with just military but if end minutes is less than start minutes this is faster.
9:47am to 8:12pm?
? = ((8.2+12)-9.78)
? = 10.42
Elapsed Time = 10:25
AE = Absolute End
AS = Absolute Start
Convert the minutes to an absolute by dividing them by 60. This will return a number easier to work with.
I.E.
9:03 would convert to 9.05 (3 divide 60 = 0.05)
4:57 would convert to 4.95 (57 divide 60 = 0.95)
If you take these numbers and this formula you can find the absolute difference.
? = ((4.95+12)-9.05)
? = 7.9
Take the decimal and convert it back by multiplying 60 by the decimal in % form.
0.9 = 90% (60*90%=54)
Elapsed Time = 7:54
Example was easier done with just military but if end minutes is less than start minutes this is faster.
9:47am to 8:12pm?
? = ((8.2+12)-9.78)
? = 10.42
Elapsed Time = 10:25
Kitty Litter for the Mind








