[AccessD] 53 Work weeks in 2007?

Gustav Brock Gustav at cactus.dk
Tue Jan 2 12:36:49 CST 2007


Hi John

Yes, you miss the last parameter:

? Format(#12/31/2007#, "ww", vbMonday ,vbFirstFourDays)
53

which is very important when working with ISO ISO 8601:1988 week numbers.

/gustav

>>> askolits at ot.com 02-01-2007 19:06 >>>
Last year I was using the following to get the week number:

WorkWeek = Val(Format("1/2/06", "ww", vbMonday)) - 1 )

The work week for my customer started on a Monday 

I never really understood why I had to add the "minus one", but the first
Monday and remaining week of 2006 would return a "2", so I just subtracted 1
and all was fine.

But this year, there are 53 Mondays so this line of code returns a "0" for
the first week of January.

Is there another way I should be getting the work week number?

John 




More information about the AccessD mailing list