group by day

shutzy

Registered User.
Local time
Today, 08:16
Joined
Sep 14, 2011
Messages
775
i want to create a report between dates but group the results by day. ie. monday tuesday wednesday etc.

i can group by date but not sure of how to do this one.

i thought that i would have to use format in the date column of the query and then select group.

is this the best way or is there a better way.

thanks
 
Hello shutzy, You can use the Weekday function to get the right Weekday then use Group By on that field..
Code:
SELECT Weekday(theDateField, vbMonday) AS randomName 
FROM theTableName
GROUP BY Weekday(theDateField, vbMonday)
 
My query would have fields for weekday and weekdayname.
The report would group on both in that order, but I would remove the group header for dayno and make the field invisible, thereby ending up with a report in day order but showing daynames

Brian
 

Users who are viewing this thread

Back
Top Bottom