int = WeekStartOf(nDate,nWeekstartDay)
For any 32-bit date (nDate), this macro function returns the date corresponding to the beginning of the week that contains nDate. This can also be used to calculate, for example, "the Wednesday before nDate".
nWeekstartDay : ranges from 1 (Monday) to 7 (Sunday) and allows you to use any weekday as the "first day of the week".
See also : WeekStartOfMonth.