WEEKDAY
TheWEEKDAY formula takes a given date and returns the day of the week it represents, as a number ranging from 1 (Sunday) to 7 (Saturday). This function is most commonly used to calculate the day of the week for a given date and to perform calculations or comparisons based on the day of the week.
- How to use
WEEKDAYformula? - Examples of using
WEEKDAYformula WEEKDAYformula not working?- Similar formulas to
WEEKDAY
Usage
Use the WEEKDAY formula with the syntax shown below, it has 1 required parameter and 1 optional parameter:
=WEEKDAY(date, [type])- date (required):
The date for which to determine the day of the week. This can be a cell reference, a date value, or a formula that returns a date. - type (optional):
An optional parameter that specifies the numbering system to use for the days of the week. By default, 1 represents Sunday and 7 represents Saturday. If this parameter is set to 2, 1 represents Monday and 7 represents Sunday.
Examples
Here are a few example use cases that explain how to use theWEEKDAY formula in Google Sheets.
Identifying the day of the week
Use WEEKDAY to quickly identify the day of the week for a given date. This can be useful for scheduling or tracking purposes, such as highlighting weekends or weekdays in a project timeline.
Calculating a due date
Use WEEKDAY along with other date-related formulas to calculate a due date based on a specific number of days, weeks, or months. For example, you might use this function to calculate the date 30 days from a given start date, excluding weekends.
Comparing dates
Use WEEKDAY to compare two dates and determine whether they fall on the same day of the week. This can be useful for analyzing trends or patterns in data that is time-based.
Common Mistakes
WEEKDAY not working? Here are some common mistakes people make when using the WEEKDAY Google Sheets Formula:
Incorrect date format
If the date provided is not in a recognized format, the formula will return an error. Make sure the date is entered in a valid format, such as YYYY-MM-DD.
Invalid type value
If the type value provided is not recognized, the formula will return an error. Make sure the type value is either 1, 2, or 3.
Incorrect number of arguments
If you do not provide the correct number of arguments, the formula will return an error. Make sure you include both the date and type arguments.
Related Formulas
The following functions are similar to WEEKDAY or are often used with it in a formula:
-
YEARThe YEAR formula in Google Sheets returns the year of a specified date. This function is useful when you need to extract the year from a date for analysis or calculations. The YEAR formula takes one argument, which is the date from which to extract the year. The output is a four-digit number representing the year.
-
MONTHThe
MONTHformula is used to extract the month from a given date, returning it as a number between 1 and 12. This function is commonly used to summarize and analyze data that includes dates. -
DAYThe
DAYfunction is used to extract the day of the month from a given date. It takes in a single argument, a date in a valid format, and returns the day of the month as a number between 1 and 31. This function can be useful for tasks such as sorting or filtering data based on the day of the month. -
DATEDIFThe
DATEDIFfunction in Google Sheets calculates the difference between two dates using a specified unit of measurement. This function is commonly used to calculate the length of time between two dates, such as the number of days, months, or years. The function is particularly useful when working with financial or project planning data. -
WORKDAYThe
WORKDAYfunction returns a date that is a specified number of workdays (excluding weekends and holidays) away from a given start date. This function is useful for calculating a project deadline or delivery date. The function takes the start date and the number of workdays to add to the start date. Additionally, you can specify a range of holiday dates to exclude from the calculation.
Learn More
You can learn more about the WEEKDAY Google Sheets function on Google Support.