When the last week of the year and the first week of the next, are the same!

mestst64

Registered User.
Local time
Today, 03:10
Joined
Mar 6, 2006
Messages
22
I have the following expression which works nicely to group all of my dates into their respective weeks of the year, by week dates beginning Mondays:

WeekStart: ([MyDateField]+1)-DatePart("w",[MyDateField],2)

However, since the week beginning 12/26/05 crosses over both '05 and '06 (as week 53 and week 1), I get two groups of dates recorded for the week of 12/26/05 when I run my query.

Since my chart is based on weekly totals, I can't have two separate totals with the same 'week beginning' date.

How can I adjust my code to get one total group of dates for the week of 12/26/05?

Help greatly-needed!....
 
Solved with answer in another posting---

I simply added a '3' argument to the following portion of my code:

DatePart("w",[MyDateField],2)

so it now reads:

DatePart("w",[MyDateField],2,3)

Which eliminates week '53' and combines the totals for week 12/26/05 as week '52'
 

Users who are viewing this thread

Back
Top Bottom