The WEEKDAY function
Returns the day of the week of a date as a number. By default 1 is Sunday and 7 is Saturday; with 2 as the second argument, Monday is 1.
Syntax
WEEKDAY(serial_number, [return_type])- serial_number
- The date to check.
- return_type (optional)
- 1 or left out for Sunday 1 to Saturday 7, 2 for Monday 1 to Sunday 7, 3 for Monday 0 to Sunday 6.
Examples
B1=WEEKDAY(DATE(2024,3,15))
| A | B | |
|---|---|---|
| 1 | 6 |
B1
=WEEKDAY(1DATE(2024,3,15),22)| A | B | |
|---|---|---|
| 1 | 5 |
In plain words: The day of the week of 1Mar 15, 2024, 2counting Monday as 1.
B1=IF(WEEKDAY(DATE(2024,3,16),2)>5,"Weekend","Weekday")
| A | B | |
|---|---|---|
| 1 | Weekend |
Practice WEEKDAY
Read the guide
Questions
How do I get the name of the day instead of a number?
Use TEXT with a day format, as in =TEXT(A2,"dddd") for Friday or =TEXT(A2,"ddd") for Fri.
Why does WEEKDAY return 1 for Sunday?
That is the default, return type 1. Add 2 as the second argument, as in =WEEKDAY(A2,2), to count from Monday as 1 to Sunday as 7.