==WEEKDAY(serial_number,[return_type])
=WEEKDAY("3-Jan-21")
This function returns returns 1 for Sunday, the numerical equivalent of the day of the week provided in the Date Argument. The first argument of the WEEKDAY function is the Date, which is "3-Jan-21" in this example. The second argument is optional and is set to 1 if omitted, which indicates that the week starts on Sunday.
=WEEKDAY("4-Jan-21")
This function returns 2 for Monday. The first argument is the Date, which is "4-Jan-21" in this example. The second argument is still set to 1, which indicates that the week starts on Sunday. The result of the function is 2 for Monday, as the week begins on Sunday.
=WEEKDAY("3-Jan-21",2)
This returns 7 for Sunday. This example is similar to the previous one, but the second argument has been changed to 2. This indicates that the week should start on Monday, so the result of the WEEKDAY function is 7 for Sunday, as Monday is the first day of the week.
=WEEKDAY(B5)
This returns Sunday as the weekday of the date in B5. This example shows how the WEEKDAY function can be used to return the day from a date in a cell
The WEEKDAY function provides an easy way to determine the day of the week for a given date, returned as a number from 1 to 7.