Time Calculations or mis-caluculations in this case

BigDogTroy

BigDogTroy
Local time
Yesterday, 22:43
Joined
Feb 12, 2008
Messages
10
I have a query with 2 time fields, a start time, and an end time. I am subtracting the endtime from the starttime and I am getting funny numbers. Example: 12:12:04pm - 12:05:20pm and I am getting #Error. Where am I going wrong? Your help is greatly appreciated.:eek:
 
Last edited:
Date Time Fields

I am extracting the time from a Date/Time field in another query, using that query info, I am trying to calculate the difference between the 2 times to figure out how long the person was on the phone. Using the "Format([StartTime] -1 -[EndTime], "Short Time")" format, I am still getting an error. Is this because the fields I'm working with is a calculated field in another query?
 
You may want to avail yourself of the CDate() function.
 
Simple Software Solutions

Have you thought of using the DateDiff Function

Example:

Elapsed = DateDiff("n",#15/02/2008 08:45:00#,#15/02/2008 08:50:00#)

n = Minutes
s = Seconds

One thing you will have to take into consideration is the fact that what happens if the date crosses midnight. In the above example I have included the Date, however you can omit the date element to work on time values only.

Code Master::cool:http://www.icraftlimited.co.uk
 

Users who are viewing this thread

Back
Top Bottom