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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Average Time for Week

Status
Not open for further replies.

chiassg

Technical User
Jan 7, 2003
1
US
Here's the code that's currently being used to show average time for a month. We'd like to show average times for the week. Can you assist? Thanks. Gayle

SELECT Months.monthname, Avg(Minute([cust_time])) AS Wait, Customer.cust_month
FROM Months INNER JOIN Customer ON Months.monthid=Customer.cust_month
GROUP BY Months.monthname, Customer.cust_month
HAVING (((Customer.cust_month)=Forms![Monthly Report]!monthid))
ORDER BY Customer.cust_month;
 
Provided the Customer table has a DateTime field you may consider grouping by DatePart("ww", [DateTimeField])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top