Excel WEEKDAY Function
The Excel WEEKDAY function takes a date and returns a number between 1-7 representing the day of week. By default, WEEKDAY returns 1 for Sunday and 7 for Saturday. You can use the WEEKDAY function inside other formulas to check the day of week and react as needed.
- serial_number - The date for which you want to get the day of week.
- return_type - [optional] A number representing day of week mapping scheme. Default is 1.
WEEKDAY accepts a date and returns a number between 1-7 representing the day of week for that date. By default, WEEKDAY returns 1 for Sunday and 7 for Saturday, as shown in the table below:
WEEKDAY supports several numbering schemes. The return type argument determines which scheme used to map each day of week to a number. The return type is optional and defaults to 1. The table below shows the result and mapping associated with each return type:
|Return type||Numeric result||Day mapping|
Note: the WEEKDAY function will return a value even when the date is empty. Take care to trap this result if blank dates are possible.