Week Number

  • Thread starter Thread starter Ramone
  • Start date Start date
R

Ramone

Hello All,

I'm trying to build an expression that needs to use the
week number. Does Access have a function that will give me
a the week number for a particular date?


Thanks for any help,

Ramone
 
Or, if you'd rather have a numeric value (Format returns a string), you can
use DatePart("ww", Now).

You should check the help file: there are a couple of optional parameters
that you can use to control how it calculates when the first week starts.
 
Format only returns a string, depending on the format code returned... If it
returned a string then;

Dim x As Long
x = Format(Now, "ww")

would give err = 13 (type mismatch). IT DOES NOT!!!!
 
Access does the automatic type-casting from String to Long
for you. Therefore, you don't get the type mismatch error.

HTH
Van T. Dinh
MVP (Access)
 

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

Similar Threads

Get date for start of week 3
Creating a date from week number, day number and year value 1
Week number 1
Week numbers 2
Weekday Date based on Week Number 5
Wrong week number 2
Week Number 2
Hello from Me. 5

Back
Top