mishlce
asked on
Calculate Start Time and End Time to get a TOTAL TIME
ACCESS TABLE: This is an access table and I am trying to come to a Total Time in Minutes for each line item.
I need to subtract Start Time from End Time to get total.
My issue is I have some that cross over midnight and I am not sure how to calculate them.
Some do not cross over midnight.
Column O is result I want.
I am not sure if I should use the field with date and time in same field or the short time with only the time in the field?
I also do not know the formula to calculate and get to results of total minutes per line item.
EmpTimeCalc.xls
I need to subtract Start Time from End Time to get total.
My issue is I have some that cross over midnight and I am not sure how to calculate them.
Some do not cross over midnight.
Column O is result I want.
I am not sure if I should use the field with date and time in same field or the short time with only the time in the field?
I also do not know the formula to calculate and get to results of total minutes per line item.
EmpTimeCalc.xls
Very easy subtract the start time (full) - endtime(full) show as time hh:mm
Copy-of-EmpTimeCalc.xls
Copy-of-EmpTimeCalc.xls
ASKER
mds-cos
I do have a field with the entire start date/time and end date/time in the same field. I am looking for how to write the calculation to get the Total Shilft Time for each line item. I see what you are saying but can you provide the exact formula for the calculation in access.
I do have a field with the entire start date/time and end date/time in the same field. I am looking for how to write the calculation to get the Total Shilft Time for each line item. I see what you are saying but can you provide the exact formula for the calculation in access.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I had others that made comments and provided answers in excel, but not in access as I originally requested. I then did not get the answers I was looking for.
This is exactly all I wanted. Someone to proivide me an example with the formula in the querie. Thanks boag2000.
This is exactly all I wanted. Someone to proivide me an example with the formula in the querie. Thanks boag2000.
;-)
If this is not an option, and if the assumption "if end time is less than start time we ran over midnight" is valid, you can still figure it out. Put an if check into your caluclation to see if start time is greater than end time. If it is, add 24 hours to your end time to get result (think in terms of a 24 hour clock, not 12 hour clock --- so start at 11pm is 23:00)