Please enable JavaScript to view this site.

 

int = WeekStartOf(nDate,nWeekstartDay)

 

This macro function returns the date corresponding to the beginning of the week that contains nDate, 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, WeekStartOf(EncodeDate(2027,1,1),1) returns 28 December 2026. If nDate is already the specified first day of the week, it is returned unchanged.

 

See also: WeekStartOfMonth.

 


Topic 110006, last updated on 18-Apr-2020