Recently, while working with our client on the Project Management portal, I was assigned to validate the SharePoint date and time column so that weekends are selected instead of weekdays.
This can be achieved by using the WEEKDAY() function in SharePoint.
In this tutorial, I will explain the functionality and syntax of the SharePoint WEEKDAY() function with an example.
I will also cover how to validate dates in SharePoint to choose WeekEnds, such as Saturdays and Sundays.
WEEKDAY() Function in SharePoint
WEEKDAY(): The weekday() function returns the day of the week corresponding to the date. By default, integers represent days ranging from (1-> Sunday) to (7-> Saturday).
Syntax: WEEKDAY(serial_number, return_type)
Parameters:
- Serial number: Input the sequential number, which represents the day of the date.
- Return type: A number represents the type of return value.
The below shows the output returned from the WEEKDAY() function:
| Return Type | Number Returned |
| 1 or Nothing | Number returns 1 (Sunday) through 7 (Saturday) |
| 2 | Number returns 1 (Monday) through 7 (Sunday) |
| 3 | Number returns 0 (Monday) through 6 (Sunday) |
Example:
WEEKDAY(“3/07/2025”) = Returns the output (6) -> Where six integers represents Friday [Day of the week starts from 1 (Sunday) follows 7 (Saturday)].
Important:
In this, dates are stored as a sequential numbers from the reference day. By default January 1, 2008 is a serial number 1. Sequential numbers can be calculated from this date.
Validate Dates in SharePoint to Choose WeekEnds [Using WEEKDAY()]
I have a SharePoint list with several columns, one of which is [Week Ending], a Date and time column.
I require setting the validation condition date column [Week Ending] so that users can only select weekends, like Saturday and Sunday, from the calendar when creating an item in the SharePoint list.
If the users select the weekday dates (Mon – Fri), the error message should display without saving the list items.
| Column Name | DataType |
|---|---|
| Title | Single line of text(Default Title) |
| Week Ending | Date and Time |
| Current Project Finish Date | Date and Time |
| Current Phase | Choice |

1. On the SharePoint list, click on the drop-down of [Week Ending] column -> Select Column Settings -> Tap on Edit.

2. In the Edit column pane, click on the More options drop-down.

3. In the Formula dialogue box, provide the formula below.
=OR(WEEKDAY(WeekEnding)=1,WEEKDAY(WeekEnding)=7)Where WeekEnding is the internal name of that column.
In the User Message box, specify the message display if the validation is not satisfied. Click on the Save button.

4. Now, we have validated the date from the Week Ending column to be selected only on weekends, such as Saturday and Sunday.
5. Create an item in the SharePoint list by adding the weekday date in the Week Ending column.

Output:
6. As you can see from the above image, whenever we try to create a new SharePoint list with a [Week Ending] column for any weekday, it displays an error message with a validation message.
After exiting from the grid view, the changes won’t be saved.
Refer to the image below:

This is how to validate the SharePoint date &time column to select only weekends.
Conclusion:
I hope this SharePoint blog post helped you solve your issues with date column validation, which allows you to choose only weekends from the calendar.
You can also visit:
- Add Days to Date in SharePoint Calculated Column
- SharePoint Calculated Column With A Hyperlink
- SharePoint Calculated Column Split String
- Easiest Way to Validate Phone Number Column in SharePoint
- SharePoint Calculated Column Round Up to Decimal Places
- Add Leading Zeros to SharePoint Calculated Column
- Create a Calculated Column Using LEN Function in SharePoint Online

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.