## Examples

`WEEKDAY("1/1/2019")` : 3

`INDEX(LIST("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"), WEEKDAY("1/1/2019"))` (Text): Tue  See also: INDEX(), LIST()

`WEEKDAY(TODAY())` : Today's numeric day of the week. See also TODAY().

`(TODAY() - WEEKDAY(TODAY()))` : Date of Saturday last week.

`(TODAY() - WEEKDAY(TODAY()) + 6)` : Date of Friday this week.

`(TODAY() - WEEKDAY(TODAY()) + 7 + 4)` : Date of Wednesday next week.

`([Weekday] - WEEKDAY(TODAY()))` : Offset of this week's `[Weekday]` (1 = Sunday, ..., 7 = Saturday) from today (e.g., 0 = today, -1 = yesterday, 1 = tomorrow).

`(TODAY() + ([Weekday] - WEEKDAY(TODAY())))` or (perhaps more intuitively) `(TODAY() - WEEKDAY(TODAY()) + [Weekday])`: Date of `[Weekday]` within the current week.

`([Date] + ([Weekday] - WEEKDAY([Date])))` or `([Date] - WEEKDAY([Date]) + [Weekday])` : Date of `[Weekday]` within a week containing `[Date]`.

`MOD(([Weekday] - WEEKDAY([Date]) + 7), 7)` : Offset of the `[Weekday]` on or after `[Date]`. See also MOD().

`MOD(([Weekday] - WEEKDAY([Date]) - 7), 7)` : Offset of the `[Weekday]` before or on `[Date]`.

`([Date] + MOD(([Weekday] - WEEKDAY([Date]) + 7), 7))` : Date of the first `[Weekday]` on or after `[Date]`.

`([Date] + MOD(([Weekday] - WEEKDAY([Date]) - 7), 7))` : Date of the first `[Weekday]` before  or on `[Date]`.

`([Date] - DAY([Date]) + 1)` or `(EOMONTH([Date], -1) + 1)`: Date of the first of the month containing `[Date]`. See also DAY(), EOMONTH().

`(([Date] - DAY([Date]) + 1) + MOD(([Weekday] - WEEKDAY([Date] - DAY([Date]) + 1) + 7), 7))` : Date of the first `[Weekday]` of the month containing `[Date]`.

`(EOMONTH([Date], 0) + MOD(([Weekday] - WEEKDAY(EOMONTH([Date], 0)) - 7), 7))` : Date of the last `[Weekday]` of the month containing `[Date]`.

`((([Date] - DAY([Date]) + 1) + MOD(([Weekday] - WEEKDAY([Date] - DAY([Date]) + 1) + 7), 7)) + (([Ordinal] - 1) * 7))` : Date of the `[Ordinal]`-th `[Weekday]` of the month containing `[Date]`.

WEEKDAY( when )

## Arguments

• when (Date or DateTime)

## Return Value

Number: The day of the week as a number (1 to 7; 1 is Sunday) if when contains a recognizable date, or 0 if not.