Skip to main content

Notifications

Community site session details

Community site session details

Session Id : kJ65jRQej3Kq52AQzZz0YC
Power Automate - General Discussion
Answered

Calculate a specific date excluding weekends (Business days only)

Like (0) ShareShare
ReportReport
Posted on 21 Jul 2021 08:07:54 by

Dear community,

 

I have a Sharepoint list with two dates (created and date of execution). I know how to calculate the remaining business days between those two dates. However, I need two additional dates in between these two dates, where a flow is triggered to send out approvals for the entries to a specific person. one of the date is three business days prior to execution, the other one 36 business hrs prior to execution. 

 

Example: If the date of execution is on Monday evening (16:00 or 4 pm), I can only calculate a date 3 days prior to that date, which would be Friday 4pm, to send out an approval to a manager. However, the manager will most likely not be in the office then anymore, and also not check the approval on the weekend. Thus, I would need this approval to be send 3 business days in advance (excluding the weekends) > Wednesday evening. 

> The same problem applies to the 36 business hrs prior to the execution date.

 

Find attached a screenshot of the list with the columns: date of creation, planned execution, remaining business days (calculated on the prior two columns) and the two important columns that are "send approval date" (this should be 3 business days in advance but is currently just 3 days in advance including weekends) and "Date for change to EC" (this should be 36 business hrs in advance but is currently 1 day in advance including weekends)

 

Any help or ideas on that matter?

 

Thank you in advance for your help.

 

Best
Philipp

 

PhilippZu_1-1626854738058.png

 

 

 

 

  • Dhaval2002p Profile Picture
    103 on 06 Nov 2023 at 19:43:45
    Re: Calculate a specific date excluding weekends (Business days only)

    @eric-cheng 

     

    Can you help me out with this formula?

    Calculate Due date, Excluding weekends based on days for priority


    https://answers.microsoft.com/en-us/msoffice/forum/all/calculate-the-due-date-based-on-the-created-date/0bbf9938-6c83-41fb-912d-d80e7972ec71

     

  • Verified answer
    eric-cheng Profile Picture
    5,171 on 21 Jul 2021 at 09:26:10
    Re: Calculate a specific date excluding weekends (Business days only)

    Hi @Anonymous ,

     

    You can use the addDays() expression to fast forward a number of days.  For example, addDays(utcNow(),3) will add 3 days from today

     

    You can also refer to this blog to use dayofWeek to get an integer of the day of the week by passing in the result of addDays().  If it is a weekend, you can keep adding days.

     

    This won't account for public holidays though.

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started