Using the WEEKDAY function to convert dates to days of the week in Excel
Using the WEEKDAY function to convert dates to days of the week in Excel: In this article, Buffcom.net will introduce to readers how to use the WEEKDAY function to convert dates to days of the week in Excel in a simple way.
1. WEEKDAY function structure
Function syntax: = WEEKDAY(serial_number; [return_type])
Where:
- Serial_number: required argument, the date that you want to find the day of the week.
- Return_type: optional argument, a number that specifies the type of return value.
Note:
- The function will return the error value #NUM! if the serial_number is beyond the range of dates.
- The function will return the error value #VALUE! if the serial_number is not a number or date.
- If the return_type is 1 or omitted, the function will return a number from 1 (Sunday) to 7 (Saturday).
- If the return_type is 2, the function will return a number from 1 (Monday) to 7 (Sunday).
- If the return_type is 3, the function will return a number from 0 (Monday) to 6 (Sunday).
- If the return_type is 11, the function will return a number from 1 (Monday) to 7 (Sunday).
- If the return_type is 12, the function will return a number from 1 (Tuesday) to 7 (Monday).
- If the return_type is 13, the function will return a number from 1 (Wednesday) to 7 (Tuesday).
- If the return_type is 14, the function will return a number from 1 (Thursday) to 7 (Wednesday).
- If the return_type is 15, the function will return a number from 1 (Friday) to 7 (Thursday).
- If the return_type is 16, the function will return a number from 1 (Saturday) to 7 (Friday).
- If the return_type is 17, the function will return a number from 1 (Sunday) to 7 (Saturday).
2. Using the WEEKDAY function to convert dates to days of the week
For example, we need to convert the dates in the image below to days of the week.
Applying the above function structure, we have the following formula:
=WEEKDAY(A2)
Copy the formula for the remaining cells to get the results as shown below. Because we omit the return_type argument in the formula, the result returned 1 corresponds to Sunday, 2 corresponds to Monday… and 7 corresponds to Saturday.
Next, we convert the days to text with the following formula:
=IF(B2=1;”Sunday”;”Thứ “&B2)
Copy the formula for the remaining cells to get the results as shown below:
Thus, the article has instructed you how to convert dates to days of the week in Excel. Hopefully, the article will be useful to you in your work. Wish you…