Hi,
I have been working on a database for a client and one of the database's main objectives was to calculate time intervals. I have been trying to find a solution to take into account when time rollovers to the next day. I thought had a solution when I looked at Article Q130514 from Microsoft where had a function calculating Elapsed Time. I employed some of the code from the function and put it into a query as shown below.
Time Interval: Int(CSng(([Discharge]-[SignIn])*24)) & ":" & Format(([Discharge]-[SignIn]),"nn")
For the Discharge and SignIn fields I am using General Date format to incoporate the date and time. The data does display correctly. However, the client wants to be able to average the interval field per person and when I tried to apply the Avg from the total line in a query using Time Interval from above I get a incompatabile data type error. I would appreciate any assistance on this. Thanks.
I have been working on a database for a client and one of the database's main objectives was to calculate time intervals. I have been trying to find a solution to take into account when time rollovers to the next day. I thought had a solution when I looked at Article Q130514 from Microsoft where had a function calculating Elapsed Time. I employed some of the code from the function and put it into a query as shown below.
Time Interval: Int(CSng(([Discharge]-[SignIn])*24)) & ":" & Format(([Discharge]-[SignIn]),"nn")
For the Discharge and SignIn fields I am using General Date format to incoporate the date and time. The data does display correctly. However, the client wants to be able to average the interval field per person and when I tried to apply the Avg from the total line in a query using Time Interval from above I get a incompatabile data type error. I would appreciate any assistance on this. Thanks.