Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help Getting an AVG on time

Status
Not open for further replies.

nufather

Programmer
Mar 18, 1999
29
US
I have an a database for trouble tickets , and heres my issue I have a Date Opened Date (format is : 06/03/99 11:18:00 AM) and a Closed Date (same format). What I need is to find out how long it takes to close a ticket and then the AVG time by Month. So....for the month of june the AVG close time for tickets was 1hr 32min or something like that.<br>
Thanx in advance for your help. - nufather
 
Not sure if this will solve the whole question, but given a table called "xxx" with date fields "dopen" and "dclose", then this query will group by month, sort Jan to Dec, and give the average per month in minutes:<br>
<br>
SELECT Format([dopen],"mmm") AS Month, Avg(DateDiff("n",[dopen],[dclose])) AS AverageTimeToClose<br>
FROM xxx<br>
GROUP BY Month([dopen]), Format([dopen],"mmm");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top