Function Reference: WEEKDAY
| Syntax | ||||||||||||||||||||||
| =WEEKDAY(serial_number,[return_type]) | ||||||||||||||||||||||
| Purpose / Description | ||||||||||||||||||||||
| Returns a number indicating the day of the week upon which a serial date number falls. It has been updated in later versions of Excel to support all combinations of possible weekend or non-trading days of the week | ||||||||||||||||||||||
| Arguments | ||||||||||||||||||||||
| Name | Type | Description | ||||||||||||||||||||
| serial_number | number | A constant, reference or nested expression which provides the serial date number for which the calculation is to be undertaken. Any decimal portion, assumed to represent time of day, is ignored. | ||||||||||||||||||||
| [return_type] | number | An optional constant, reference or nested expression which indicates how the weekday number is t be calculated. Defaults to 1, if omitted.
|
||||||||||||||||||||
| Return Values | ||||||||||||||||||||||
| Type | Specific Value | Description | ||||||||||||||||||||
| number | 0 - 7 | The day of the week number based on the return_type specified. | ||||||||||||||||||||
| error | #VALUE! | if serial_number or return_type is not a number and cannot be coerced to number. | ||||||||||||||||||||
| error | #NUM! | If the number passed in serial_number is outside the range allowed 1900 date system 0 to 2,958,465 1904 date system 0 to 2,957,003 |
||||||||||||||||||||
| error | Any errors referenced by arguments are returned due to propagation of error values. | |||||||||||||||||||||
| Notes / Comments / Advice / Warnings | ||||||||||||||||||||||
| Note: | The return_type values 11 to 17 were added in Excel 2007 to better handle internationalisation and alternative week management requires, such as payroll weeks which don't end on a Friday or Saturday. | |||||||||||||||||||||
| Examples: | Open / download sample workbook: WEEKDAY, WORKDAY, WORKDAY.INTL.xlsx | |||||||||||||||||||||