April 23, 200817 yr I have an application where time is entered as a number based on a 24 hour clock without separators (such as ":"); for example, the "start time" of 8:30 AM would be entered as 0830 and "finish time" of 4:00PM would be entered as 1600. I would like a way to calculate the total time (duration) between two such entries that results in a number not time. Obviously, a simple calc: Total Time = "finish time" - "start time" for on the hour entries is simple but in the case above, the calc would generate 730 and the preferred result would be 7.5 (hours). Edited April 23, 200817 yr by Guest
April 23, 200817 yr Try: Div ( end ; 100 ) - Div ( start ; 100 ) + ( Mod ( end ; 100 ) - Mod ( start ; 100 ) ) / 60
April 24, 200817 yr Author Thank you -- that works great:) I furthered this to account for durations that go into at least the next day: Div ( end ; 100 ) - Div ( start ; 100 ) + ( Mod ( end ; 100 ) - Mod ( Start ; 100 ) ) / 60 + ((returndate_calc - begindate_calc) * 24)
Create an account or sign in to comment