WeekOf, WeekNumberOf

Navigation:  Macros > Macro Language > Built-in Functions > All Functions (Alphabetical) >

WeekOf, WeekNumberOf

Previous pageReturn to chapter overviewNext page

int = WeekOf(nDate)

int = WeekNumberOf(nDate)


These 2 macro function are exactly the same. Use either one as a personal preference; one being more explicit as to the return value, the other being more consise.


Both functions return the week number corresponding to nDate. The return values range from 1 to 53.


This function uses the ISO week numbering scheme : week 1 of a given year is the first week containing a Thursday. Another way of thinking about it is that if a week contains a Thursday in the new year, then that week has at most 3 days in the previous year, and at least 4 days in the new year. So it has the majority of its days in the new year and is the first week of that new year.


See also : DayOf, WeekdayOf, MonthOf.

Topic 105064 updated on 05-Mar-2002.
Topic URL: https://www.qppstudio.net/webhelp/index.html?weeknumberof.htm