WEEKDAY function

WEEKDAY(Date, ReturnType?) WEEKDAY(Date; ReturnType?)

Date

Number or { Number }

The date as a sequential serial number.

ReturnType

Number or { Number } (optional)

The type of the desired return value. (Refer to the table for more information.) If omitted, 1 is assumed, meaning that weeks start on a Sunday.

Returns

Number or { Number }

The day of the week.

Returns the day of the week of the given date.

The meaning of the return value varies depending on the returnType parameter. Refer to this table for more information:

Valid values for the returnType parameter
Value Meaning
1 (default) 1 (Sunday) through 7 (Saturday)
2 1 (Monday) through 7 (Sunday)
3 0 (Monday) through 6 (Sunday)
11 1 (Monday) through 7 (Sunday)
12 1 (Tuesday) through 7 (Monday)
13 1 (Wednesday) through 7 (Tuesday)
14 1 (Thursday) through 7 (Wednesday)
15 1 (Friday) through 7 (Thursday)
16 1 (Saturday) through 7 (Friday)
17 1 (Sunday) through 7 (Saturday)

Examples

WEEKDAY(DATE(2021, 2, 17))WEEKDAY(DATE(2021; 2; 17))

Returns 4, indicating that February 17, 2021, is a Wednesday. The returnType parameter has not been set, meaning that the return value 1 indicates a Sunday.

WEEKDAY(DATE(2021, 2, 17), 13)WEEKDAY(DATE(2021; 2; 17); 13)

Returns 1, indicating that February 17, 2021, is a Wednesday. The returnType parameter has been set to 13, meaning that the return value 1 indicates a Wednesday.