group by weekly date

J

JRS

I have data by log date and I want my query to group calls by week Mon thru
Sun. I also want to do by month. Is there a way to set that up? thanks

Log Date
02/03/2008
02/05/2008
02/05/2008
02/05/2008
02/05/2008
02/06/2008
02/06/2008
02/07/2008
02/07/2008
02/07/2008
02/07/2008
02/08/2008
02/08/2008
02/08/2008
02/08/2008
02/09/2008
02/09/2008
02/10/2008
02/11/2008
02/11/2008
02/11/2008
02/11/2008
02/11/2008
02/11/2008
 
D

dustinbrearton

JRS said:
I have data by log date and I want my query to group calls by week Mon thru
Sun. I also want to do by month. Is there a way to set that up? thanks

Log Date
02/03/2008
02/05/2008
02/05/2008
02/05/2008
02/05/2008
02/06/2008
02/06/2008
02/07/2008
02/07/2008
02/07/2008
02/07/2008
02/08/2008
02/08/2008
02/08/2008
02/08/2008
02/09/2008
02/09/2008
02/10/2008
02/11/2008
02/11/2008
02/11/2008
02/11/2008
02/11/2008
02/11/2008


The DatePart function is probably going to work best to accomplish both.

DatePart(interval, date[,firstdayofweek[, firstweekofyear]])

Example from MS Access help is below

Dim TheDate As Date ' Declare variables.
Dim Msg
TheDate = InputBox("Enter a date:")
Msg = "Quarter: " & DatePart("q", TheDate)
MsgBox Msg
 

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