Please enable JavaScript to view this site.

 

int = WeekStartOfMonth(nYear,nMonth,nWeekstartDay)

 

This macro function returns the date corresponding to the beginning of the week that contains the first day of the month nMonth in the year nYear, using nWeekstartDay, which ranges from 1 (Monday) to 7 (Sunday), to define the beginning of the week.

 

The returned date can be in the preceding month or year. For example, WeekStartOfMonth(2027,1,1) returns 28 December 2026, the Monday starting the week that contains 1 January. To find the first Monday within January, a different calculation is needed.

 

See also: WeekStartOf.

 


Topic 110007, last updated on 18-Apr-2020