Week Numbers

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
 
J

John W. Vinson

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
 

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