ISO week number in VBScript or VBA
问题 How can I get the ISO week number of some date in VBScript or VBA? 回答1: First, note that: It is important to report the week year along with the week number, as the date's year could be different. Several Windows components contain a bug for some years' last Monday. In my experience the simplest, clearest and most robust way to compute this is: Sub WeekNum(someDate, isoWeekYear, isoWeekNumber, isoWeekDay) Dim nearestThursday isoWeekDay = WeekDay(someDate, vbMonday) nearestThursday = DateAdd(