Page 1 of 1
math question! - calculate time
Posted: Thu Jun 01, 2006 4:15 pm
by Naethyn
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!
Posted: Thu Jun 01, 2006 4:28 pm
by Ganzo
millitary time.
4:57pm = 16,57
09:03am = 9,03
16,57 - 9.03 = 7,54
elapsed time is 7 hrs and 54 min

Posted: Thu Jun 01, 2006 4:50 pm
by Phlegm
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.
Posted: Thu Jun 01, 2006 4:52 pm
by Dylan
Buy a watch.
Posted: Thu Jun 01, 2006 5:43 pm
by Gidan
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.
Posted: Thu Jun 01, 2006 6:03 pm
by Phlegm
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.
Posted: Fri Jun 02, 2006 1:42 am
by brinstar
math

Posted: Fri Jun 02, 2006 5:23 am
by Griever
brinstar wrote:math

Posted: Fri Jun 02, 2006 8:39 am
by Granh
? = ((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
Posted: Fri Jun 02, 2006 12:01 pm
by Phlegm
I think my way is still faster.