KevinNewtoAccess
Technical User
I have seen this topic raised a couple of times but, as yet, cannot get a working solution.
I need to get the weeknumber of any given date.
I have looked back over previous solutions to this and am using the following function
Public Function WeekNum(Mydate)
WeekNum = Format(Mydate, "ww"
End Function
However, this appears to be giving some wrong answers! When I feed this with the date 8/12/2000 it returns weeknumber 50 - my diary (and my customers) shows this as week 49. When trying todays date 16/3/2001 it returns 11 which is correct.
Any suggestions?
I need to get the weeknumber of any given date.
I have looked back over previous solutions to this and am using the following function
Public Function WeekNum(Mydate)
WeekNum = Format(Mydate, "ww"
End Function
However, this appears to be giving some wrong answers! When I feed this with the date 8/12/2000 it returns weeknumber 50 - my diary (and my customers) shows this as week 49. When trying todays date 16/3/2001 it returns 11 which is correct.
Any suggestions?