I have a query which when run calculates the average length of time, which works most of the time. However there are a few instances in which it is far from accurate, usually with overnight time spans such as 6pm to 3am.
The times are entered and stored in a medium time format. 10:00AM as an example.
The calculation that obtains the actual length of time is:
And returns the following as the length of time.
Would be translated into 7 and 1/2 hours.
I have a feeling that how this calculation is made is the cause of the error in its ability to accurately calculate the average time frames.
Any suggestions?
The times are entered and stored in a medium time format. 10:00AM as an example.
The calculation that obtains the actual length of time is:
Code:
IIf([End_Time]<8,([End_Time]+24)-[Start_Time],[End_Time]-[Start_Time])
Code:
1/22/1900 7:30:00 AM
1/23/1900 8:15:00 AM
1/22/1900 9:30:00 AM
Would be translated into 7 and 1/2 hours.
I have a feeling that how this calculation is made is the cause of the error in its ability to accurately calculate the average time frames.
Any suggestions?