The WEEKDAY function accepts a date and returns the day number of that date. The date must be in a valid format, so you have to use the DATE function, wrap it in quotes, or use a cell reference to a cell containing a date.
If your days, months, and years are in different cells, use the DATE function to combine them.
Syntax
=WEEKDAY(date,[type])
date
– The date for which you want the week number. This is required.[type]
– Optional specification of which numbers scheme to use for the days of the week,-
- 1 – Sunday = 1, Monday = 2, etc.
- 2 – Monday = 1, Tuesday = 2, etc.
- 3 – Monday = 0, Tuesday = 1, etc.
Related functions
DATE – Takes separate year, month, and day values and returns them as a date
DATEVALUE – Returns the serial value of a date
DAY – Returns the value the day from a given date
Errors
#NUM – The input is a number but is not a valid date. This could happen if you used the 35th day of November.
#VALUE! – The input is something that doesn’t convert to a number such as “The other day” or “Yester-yester-day”.
Examples
Live examples in Sheets
Go to this spreadsheet for the examples of the WEEKDAY function shown above that you can study and use anywhere you would like.