WEEKDAY()

Day of week from Date or DateTime

Returns the day of the week as a Number (1 to 7; 1 is Sunday) date is recognized, or 0 if not (that is, if the input is invalid).

Sample usage

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

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

WEEKDAY(TODAY()) returns today's numeric day of the week. See also: TODAY()

(TODAY() - WEEKDAY(TODAY())) returns date of Saturday last week.

(TODAY() - WEEKDAY(TODAY()) + 6) returns date of Friday this week.

(TODAY() - WEEKDAY(TODAY()) + 7 + 4) returns date of Wednesday next week.

([Weekday] - WEEKDAY(TODAY()))returns offset of this week's [Weekday] (1 = Sunday, ..., 7 = Saturday) from today (for example, 0 = today, -1 = yesterday, 1 = tomorrow).

(TODAY() + ([Weekday] - WEEKDAY(TODAY()))) or (perhaps more intuitively) (TODAY() - WEEKDAY(TODAY()) + [Weekday])returns the date of [Weekday] within the current week.

([Date] + ([Weekday] - WEEKDAY([Date]))) or ([Date] - WEEKDAY([Date]) + [Weekday]) returns the date of [Weekday] within a week containing [Date].

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

MOD(([Weekday] - WEEKDAY([Date]) - 7), 7) returns the offset of the [Weekday] before or on [Date].

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

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

([Date] - DAY([Date]) + 1) or (EOMONTH([Date], -1) + 1) returns the 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)) returns the date of the first [Weekday] of the month containing [Date].

(EOMONTH([Date], 0) + MOD(([Weekday] - WEEKDAY(EOMONTH([Date], 0)) - 7), 7)) returns the 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)) returns the date of the [Ordinal]-th [Weekday] of the month containing [Date].

Syntax

WEEKDAY(when)

  • when - A Date or DateTime value.

See also

Date and time expressions

DAY()

EOWEEK()

EOMONTH()

WEEKNUM()

WORKDAY()

Was this helpful?
How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
false
false