Average Duration of time

K

ken

I am using the following query to list the opendate and the duration a call
has been opened.
How can I get the average duration a call is opened for each month.

SELECT calls.OpenDate, DateDiff("n",[Time_In],[Time_Out])\60 & ":" &
Format(DateDiff("n",[Time_In],[Time_Out]) Mod 60,"00") AS Duration
FROM calls;

Thanks
Ken
 
J

John Spencer (MVP)

I think you MIGHT get it with something like the following, although I've
probably screwed up the placement of the parentheses.

SELECT calls.OpenDate,
Avg(DateDiff("n",[Time_In],[Time_Out]))\60 & ":" &
Format(Avg(DateDiff("n",[Time_In],[Time_Out])) Mod 60,"00") AS Duration
FROM calls
Group by Format(Calls.OpenDate, "YYYY-MM")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top