Please enable JavaScript to view this site.

 

int = WeekOf(nDate)

int = WeekNumberOf(nDate)

 

These 2 macro functions are the same and both return the ISO week number, from 1 to 53, of the date nDate.

 

An ISO week starts on Monday, and week 1 is the week containing the year's first Thursday. Near the beginning or end of a calendar year, the ISO week can belong to the preceding or following year. For example, 1 January 2027 is in ISO week 53 of 2026. Combining YearOf with this function does not always produce the correct ISO year/week label.

 

See also: DayOf, WeekdayOf, MonthOf.

 


Topic 105064, last updated on 18-Apr-2020