Week Numbers

  • Thread starter Thread starter alecgreen
  • Start date Start date
A

alecgreen

Hi

In my query, I have the following [WEEK: Format(Date(),"ww")], bearing
in mind today is 16/8/2010, the query returns week 34. But according
to my desk calender its week 33. I don't understand!

Alec
 
Hi

In my query, I have the following [WEEK: Format(Date(),"ww")], bearing
in mind today is 16/8/2010, the query returns week 34. But according
to my desk calender its week 33. I don't understand!

Alec

The "week of the year" is ambiguous. If January 1 is a Saturday, is that week
1 and January 2 starts the second week? Or is Week 1 the first full week, or
the first week containing (say) a Tuesday?

Fortunately there's an optional argument to the Format function which lets you
choose your preferred convention. Open the VBA editor (to get to the right
help file) and read the Help for the Format() function.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Back
Top