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.
|