How to Check IF the Date is Weekend in Power Automate?

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:

Calculating workend days in Power Automate

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.

How do you determine the day of the week in Power Automate

2. Add a Compose action to Calculate the Initial Due Date using the below expression:

addDays(utcNow(),2,'MM/dd/yyyy')
How to check if the date is weekend in Power Automate

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

dayOfWeek(outputs('Compose'))
Power Automate to calculate Due Date for a task

4. Then add Switch Condition to update the due date.

  • On: Take the Output of the Compose 1 action from the dynamic content.
Identifying Weekends From Date Column in Power Auotmate

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

Identify weekends in between start time and end time in Power Automate

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')
How to check if a date is a weekend or a holiday

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

Power Automate exclude weekends

8. Add the Update item action inside Case 2, providing the Site Address, List name, and ID. Then, expand Advanced parameters and give the due date as below expression:

addDays(utcNow(), 3, 'MM/dd/yyyy')
Check for previous day, including weekends in Power Automate

9. Add the Update item action inside the default case, providing the Site Address, List name, ID. Then, expand Advanced parameters and provide Compose action output using dynamic content.

Power Automate Check if dateTime is a weekend or a weekday

Save the flow, go to the SharePoint list, and add an item.

Check IF the Date is Weekend in Power Automate

After the flow runs successfully, refresh the SharePoint list. You will see that the due date is 3/24/2025 because Today is Friday.

How to Check IF the Date is Weekend using Power Automate

Calculate Working Days While Excluding Weekends in Power Automate

Suppose you’re building a leave request system where employees submit a leave request with a Start Date and End Date. You must calculate the number of leave days, excluding Saturdays and Sundays.

To do this, follow the below steps:

1. Open the Power Automate Home page and choose Instant cloud flow with trigger Manually trigger a flow. Click on +Add an Input to add two date inputs (Start Date and End Date) to allow users to manually enter the leave period.

Calculate Working Days While Excluding Weekends in Power Automate

2. Add a compose to calculate the total number of days (including weekends) between the given Start Date and End Date using the below expression:

dateDifference(triggerBody()?['date'],triggerBody()?['date_1'])
Calculate Working Days While Excluding Weekends using Power Automate

3. Add another Compose action and provide the below expression:

add(int(split(outputs('Compose'),'.')?[0]),1)

Where:

  • The dateDifference() function might return a decimal value, so split(outputs(‘Compose’),’.’)?[0] extracts the whole number part.
  • int(…) converts this value into an integer.
  • add(…,1) ensures that the total count includes both the start and end dates (making it an inclusive count).
power automate add days excluding weekends

4. Then add a select action and provide the below parameters:

  • From: Provide below expression:
range(0,outputs('Compose_1'))
  • Map: Click the T icon and give the below expression:
{
  "Date": @{addDays(triggerBody()?['date'],item())},
  "Day": @{addDays(triggerBody()?['date'],item(),'dddd')}
}

It generates a list of dates between the Start and End Dates. It also identifies the day of the week for each date.

power automate calculate working days between dates

5. Add a Filter array action and provide the below parameters:

From:

@{body('Select')}

Filter Query:

@{and(not(equals(item()?['Day'],'Saturday')),not(equals(item()?['Day'],'Sunday')))}

This step removes Saturdays and Sundays from the list of dates. It ensures that only working days (Monday to Friday) are counted.

power automate days between two dates

6. Add a Compose action and provide the below parameter:

length(body('Filter_array'))

This step counts the number of working days after removing weekends. The output will be the total number of leave days, excluding Saturdays and Sundays.

How to Calculate Working Days While Excluding Weekends in Power Automate

Run the Flow to Calculate Working Days While Excluding Weekends

Now, save the flow. -> Click Test (top-right corner) -> Select Manually and click Test again. -> Enter Start Date & End Date in the input fields.

For Example: Start Date: 2025-03-18, End Date: 2025-03-25

Run the Flow to Calculate Working Days While Excluding Weekends

Click Run flow and wait for execution. After the flow runs successfully, you can see the number of days in the last compose action.

How to Check IF the Date is Weekend  Power Automate

Conclusion

In this tutorial, I explained two key scenarios in Power Automate: checking if a date falls on a weekend and calculating working days while excluding weekends. First, I showed how to adjust a due date in a SharePoint list if it falls on a Saturday or Sunday.

Then, I explained how to calculate leave days in a leave request system, ensuring weekends are not counted. We efficiently determined the correct working days by using expressions and actions like Compose, Select, Filter array, and Update item.

Moreover, you may like some more Power Apps tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App