Get the day of the week as a number
=WEEKDAY(serial_number, [return_type])
| Parameter | Description |
|---|---|
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. |
By default and without a value fore return_type, WEEKDAY starts counting on Sunday:
=WEEKDAY("3-Jan-21") // Sunday, returns 1
=WEEKDAY("4-Jan-21") // Monday, returns 2
To configure WEEKDAY to start on Monday, set return_type to 2*:*
=WEEKDAY("3-Jan-21",2) // Sunday, returns 7
=WEEKDAY("4-Jan-21",2) // Monday, returns 1
In the example shown above, the formula in D5 (copied down) is:
=WEEKDAY(B5) // Sunday start
The formula in E5 (copied down) is:
=WEEKDAY(B5,2) // Monday start