In our leave management application, I needed to calculate leave days while ensuring weekends were excluded from the total count. Since weekends shouldn’t be considered leave days, I had to find a way to check if a given date falls on a Saturday or Sunday.
After some research, I found an efficient way to identify and exclude weekends from the leave calculation using Power Automate.
In this tutorial, I will show you how to check if the date is weekend in Power Automate. Additionally, I will also guide you on how to calculate working days while excluding weekends.
Check IF the Date is Weekend in Power Automate
Suppose you work in an IT support team managing tasks in a SharePoint list called Task Tracker. Each new task automatically gets a due date set 2 days after creation. However, if this due date falls on a weekend (Saturday or Sunday), it should be adjusted to the next Monday.
For example, I am using the below SharePoint List:

To do this, follow the below steps:
1. Create an automated cloud flow. Give the flow name and select the trigger When an item is created. Also, provide the Site Address and List Name.

2. Add a Compose action to Calculate the Initial Due Date using the below expression:
addDays(utcNow(),2,'MM/dd/yyyy')

3. Then add another Compose action to Check if the Due Date Falls on a Weekend using the below expression:
dayOfWeek(outputs('Compose'))

4. Then add Switch Condition to update the due date.
- On: Take the Output of the Compose 1 action from the dynamic content.

5. Click + Add case to add the first switch case. Manually enter the value 6 (Saturday) inside the Equals parameter.

6. Add the Update item action inside the case, providing the Site Address, List name, and ID. Then, expand Advanced parameters and give the due date as below expression:
addDays(utcNow(), 4, 'MM/dd/yyyy')

7. Click + Add case to add the first switch case. Manually enter the value 0 (Sunday) inside the Equals parameter.
