Formatting da6e as week # in access query

I would like to format a week in an access query to show the week #.  Does anyone know the proper format?
marku24Asked:
Who is Participating?
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>33/_/_    How do i get it to format as a number.
Not really sure what your asking.

There's a number of convert to number formats:

CLng(anything) will return the Long Integer (i.e. no decimal values) numeric value.
CDbl(anything) will return the Double (with decimal values) numeric value.
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
?Format(now(), "ww")
33

As apparently we're in the 33rd week of the year.

BUT ... this is calendar week, so if you have a different definition of week number, you'll need to spell that out.
0
 
marku24Author Commented:
I got that to work in the query but it is formatting as a date:  

33/_/_    How do i get it to format as a number.  the column format option has nothing in there so i can't select "number".
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
If you're trying to convert the 33 week...

CInt(anything) converts to a small integer, which is +/- 32,000-ish.
CByte(anything) converts to a byte, which is 0 to 255.
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the greade.  Good luck with your project.  -Jim
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.