Ah, I see. You're recommending treating a Date field as a duration,
something I always advise against.
Of course, your solution doesn't actually solve the original problem,
since the OP needs to calculating the duration.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
The Date data type includes seconds. So, by averaging the elapsed
times you'd get just what the OP was looking for as a date data type
which can be displayed as time. So, in this particular case, the SQL
would be:
SELECT Avg(Exp1) AS TheAverage, CDate([TheAverage]) AS AvgResponse
FROM tblWhatever
--
Paul Overway
Logico Solutions
http://www.logico-solutions.com
message If the average is a number of seconds, how will CDate give you
anything useful?
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
message A UDF is really not necessary...you could just use Avg in the query
and then CDate the result...i.e.,
SELECT Avg(TheDate) AS TheAverage, CDate([TheAverage]) AS AvgDate
FROM tblWhatever
--
Paul Overway
Logico Solutions
http://www.logico-solutions.com
message Use the DateDiff function to give you the response time in seconds.
Average the number of seconds. Write a function to convert from
seconds to h:m:s format.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
I need to calculate average response times for a list
alarmdate arrivaldate Expr1
9/16/2004 12:51:10 AM , 9/16/2004 12:56:08 AM=0:4:58
10/26/2004 5:39:41 PM , 10/26/2004 5:45:04 PM=0:5:23
10/28/2004 6:21:09 PM , 10/28/2004 6:29:30 PM=0:8:21
10/28/2004 10:26:49 PM , 10/28/2004 10:34:04 PM=0:7:15
11/2/2004 7:15:45 AM , 11/2/2004 7:28:09 AM=0:12:24
How do I average H:N:S over a list.