Changing Week Start Day

Meinthecorner

Registered User.
Local time
Today, 08:33
Joined
Nov 29, 2008
Messages
25
Access 2007, Crosstab query .

Evening - We've just started opening our business on a Sunday and this little issue has just manifested itself!

We record volumes of calls previously just Monday to Saturday and the call volumes are grouped by week number. Which worked fine, now we open Sunday the Sunday values are pushed to the next week number. The customer wants all data for the week grouped Monday to Sunday, otherwise I'd just let the pushed week roll into the next week.

So for this week 16th to 22nd May, my week number would normally be 21. But the 22nd data is added to week 22

The current query field is:

Code:
Format([CallDate],"ww")

This works. I've done some digging and found this possible suggestion

Code:
 Val(Format([WorkingDate], "ww", vbMonday))

So my query field looked like this

Code:
Val(Format([CallDate],"ww", vbMonday))

But when I leave the field it adds [] round the vbMonday, and the query fails.

So any pointers so that my week number group goes from Monday to Sunday?
 
Try:

Val(Format([CallDate],"ww", 2))

hth
Chris
 
i think its just that you can't use the vbconstant (vbmonday) in a QUERY - although you can use it in code OK.
 

Users who are viewing this thread

Back
Top Bottom