PDA

View Full Version : Calculating time



Scooter172
11-25-2010, 10:20 PM
I want to be able to run a query and in doing so calculate h:M:S

OBP
11-26-2010, 06:24 AM
A bit more infromation would be helpful.
What fields do you have?
What format are they in?

Scooter172
12-03-2010, 11:09 PM
During a given day we have Operators changing equipment but need to track what that duration of operation is. Operator A operates Vehicle 1 from A:A to Z:Z. Then in the middle of that pre determined length the Vehicle/Or Operator can changed due to maint. or other issue. I need to document that change and and the duration from the original start time to the cut time. Then begin from that relief time to the original predetermined end. The format in the table is (short time) for the time calculation. Also Our work day begins at 02:20 Today and ends at 3:32X the next day for a given days schedule. This causes one day to be starting as another is ending. Fields are [Block][Oper Number] [Start] [End] [Relief][Location][Miles][V1][V2][V3].

SP

Sean.DiSanti
12-04-2010, 11:26 AM
check out DateDiff()

Scooter172
12-04-2010, 02:04 PM
This works well as long as the start and stop times are the same calendar day. Would I need to change the input mask for the original table to Long time to make it calculate minutes between days? Total Minutes: DateDiff("n",[Start Time],[End Time])

Scooter172
12-07-2010, 11:50 AM
Used EXPR DateDiff to calculate interval of Minutes then created a second EXPR to divide that by 60.. dirty but gives the result needed. (Sorry no VBA)