Set firstdayofweek on report sorting and grouping

S

s4

Hi, does anyone know how to set the first day of week on sorting and grouping
on a report. Like having records grouped into a week, but the week starting
with a Sunday??

Thanks
 
K

Ken Sheridan

First group on the year with Year([YourDateField]) to separate rows in the
same weeks in different years, and then on the week, using the Datepart
function with the FirstDayOfWeek argument set to 1;
DatePart("ww",[YourDateField],1).

As Sunday is the default first day of week you can omit the final argument
in fact.

Ken Sheridan
Stafford, England
 
S

s4

Thanks Ken, much appreciate it!

Ken Sheridan said:
First group on the year with Year([YourDateField]) to separate rows in the
same weeks in different years, and then on the week, using the Datepart
function with the FirstDayOfWeek argument set to 1;
DatePart("ww",[YourDateField],1).

As Sunday is the default first day of week you can omit the final argument
in fact.

Ken Sheridan
Stafford, England

s4 said:
Hi, does anyone know how to set the first day of week on sorting and grouping
on a report. Like having records grouped into a week, but the week starting
with a Sunday??

Thanks
 

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