Programming Reference Manual
 
Syntax
 
Weekday(dateexpr)
 
Description
Return the weeknumber.
 
Note: As the example shows below, WeekNum has a different approach on calculating week numbers than DatePart. This behaviour is caused by Microsoft Windows operating systems with European local settings. In some years, when a calender shows 53 weeks (like the year 2009) instead of the standard 52 weeks, the operating system returns a incorrect weeknumber when using DatePart. The WeekNum function however, does not  depend on operating system settings and will allways return the correct week number.
 
 
Parameter
Description
dateexpr 
Return the weekday for this date value. If the expression is not a  valid datevalue then 0 is returned. 
See Also
Example
 
Sub Main
  
   Dim myDate As Date
 
   myDate = #2010/1/5#    'Note that the year 2009 has 53 weeks
 
   Debug.Print WeekNum(myDate)         '1
   Debug.Print DatePart("ww",myDate)   '2
 
End Sub