WEEKDAY

Returns a number representing the day of the week of the date provided.

Parameter List

Syntax
WEEKDAY(date
[type]
)
date

The date for which to determine the day of the week. For example: 2022-02-21.

[optional] type

A number indicating which numbering system to use to represent weekdays. By default, counts starting with Sunday.

  • If 'type' is '1' or is omitted, days are counted from Sunday and the value of Sunday is 1, therefore the value of Saturday is 7.
  • If 'type' is '2', days are counted from Monday and the value of Monday is 1, therefore the value of Sunday is 7.
  • If 'type' is '3', days are counted from Monday and the value of Monday is 0, therefore the value of Sunday is 6.

Examples

WEEKDAY("2022-03-14") returns 2