Week number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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?
 
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
 
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>
 
Back
Top