Week number

I

IanF

Hi,

What function can I use to return the number of the week in the year that we are currently in?

I have tried DatePart but this does not work.

Cheers
Ian
 
B

Bruce M. Thompson

What function can I use to return the number of the week in the year that we
are currently in?
I have tried DatePart but this does not work.

Sure it does. Below is from the debug window:

? datepart("ww",date())
8
 
J

John Vinson

Hi,

What function can I use to return the number of the week in the year that we are currently in?

DatePart("ww", Date())

will return the current week number.
I have tried DatePart but this does not work.

What "didn't work"? Could you post the actual code? Note that "w" is
the current day of the week, 1 = Sunday, 7 = Saturday - did you use
that instead of "ww" perhaps?
 
I

IanF

Apologies guys, my mistake - it actually does work - query was looking at wrong date and giving answers I wasn't expectin

Cheers for the help
 
B

Bruce M. Thompson

Apologies guys, my mistake - it actually does work - query was looking at
wrong date and giving answers I wasn't expecting
Not a problem. We've all been bitten by that bug. <g>
 
Top