Returns the day of the week corresponding to a date. The day is given as an integer, ranging from 1 (Sunday) to 7 (Saturday), by default.
- is the serial date number that represents the given date. If missing, the current date is used.
- is a number that designates the weekdays coding (or ordering) scheme. If missing, convention=1 (Sun=1,..,Sat=7) is assumed.
RETURN_TYPE NUMBER RETURNED 1 or omitted Numbers 1 (Sunday) through 7 (Saturday). Behaves like previous versions of Microsoft Excel. 2 Numbers 1 (Monday) through 7 (Sunday). 3 Numbers 0 (Monday) through 6 (Sunday). 11 Numbers 1 (Monday) through 7 (Sunday). 12 Numbers 1 (Tuesday) through 7 (Monday). 13 Numbers 1 (Wednesday) through 7 (Tuesday). 14 Numbers 1 (Thursday) through 7 (Wednesday). 15 Numbers 1 (Friday) through 7 (Thursday). 16 Numbers 1 (Saturday) through 7 (Friday). 17 Numbers 1 (Sunday) through 7 (Saturday).
- NxWeekday performs functionality as the MS Excel built-in function (WEEKDAY), with one important enhancement: it supports and returns array-type arguments.
- Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900.
- If serial_number is out of range for the current date base value, a #NUM! error is returned.
- If return_type is out of the range specified in the table above, a #NUM! error is returned.
- Hans-Peter Deutsch, Derivatives and Internal Models, Palgrave Macmillan (2002), ISBN 0333977068