web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Delay for 10 working days
Power Automate
Answered

Delay for 10 working days

(1) ShareShare
ReportReport
Posted on by 280
Good day experts!
 
I have a flow that sends an email on weekdays only. After update item, days should be counted from today excluding saturday and sunday. After 10 working days, send an email will trigger.
 
Thank you in advance.
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    Since you don't show your flow or fully explain what you're doing, you can start with this expression:
    • if(equals(dayOfWeek(addDays(utcNow(), 10)), 0), 1, if(equals(dayOfWeek(addDays(utcNow(), 10)), 6), 2, dayOfWeek(addDays(utcNow(), 10))))
    I assume the days to be counted from is the modified date? If so, in the above expression you would replace utcNow() with the modified date. The expression returns either 1 or 2 depending on the result. The result being if the day is Saturday or Sunday when you add 10 days. If Sunday (0) is the result, it returns 1. If Saturday (6) is the result, it returns 2.
     
    You can then use this to add the correct number of days so the date does not fall on Saturday or Sunday.
     
    We can then expand this so if it is not a Saturday or Sunday, it returns 0. We can then use this expression to add to 10 the correct number of days so it does not fall on Saturday or Sunda with this expression:
     
    addDays(utcNow(), add(if(or(equals(dayOfWeek(addDays(utcNow(), 10)), 0), equals(dayOfWeek(addDays(utcNow(), 10)), 6)), if(equals(dayOfWeek(addDays(utcNow(), 10)), 0), 1, 2), 0), 10))
     
    You could use this for any number of days by replacing 10 with the number of days you want to add without it falling on a weekend.
     
     
  • scorpio24 Profile Picture
    280 on at
    @David_MA thank you for this! shall I add a compose action before my delay action? this is what my flow looks like:

  • VictorIvanidze Profile Picture
    13,073 on at
    Use this approach to delay sending: https://ivasoft.com/delayedemail.shtml
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    Yes, I suppose you can use a delay. I thought you were looking for it to return a date, which is what my original expression returns. If you are going to use this in a delay, then you need an integer. 
     
    I set this up in a variable:
    The expression is: add(if(or(equals(dayOfWeek(addDays(utcNow(), 10)), 0), equals(dayOfWeek(addDays(utcNow(), 10)), 6)), if(equals(dayOfWeek(addDays(utcNow(), 10)), 0), 1, 2), 0), 10)
     
    To change the length of the delay, you would replace 10 with the number of days you want to delay. I then use the variable in the delay action:
     
    You could use the expression directly in the delay field as well, but you may need to wrap the expression in an int() expression to ensure it returns a number.
     
  • scorpio24 Profile Picture
    280 on at
    Hi @David_MA tried your codes below but after few tests, all I am getting is always '10' days. the goal is to exclude Saturday and Sunday in the delay. Can you please elaborate. Thank you so much
  • Verified answer
    VictorIvanidze Profile Picture
    13,073 on at
     
    How did you test? David_MA's solution works fine for me:
     
  • Verified answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    @scorpio24 can you show how you tested this and the configuration. I use this method in several flows for setting due dates of tasks, so they do not fall on a weekend. This method has always worked for me. Here it is configured in a flow I am currently working on, where they want to allow four working days for the task to be completed:
     
    The variable to set the delay:
    The expression used: add(if(or(equals(dayOfWeek(addDays(utcNow(), 4)), 0), equals(dayOfWeek(addDays(utcNow(), 4)), 6)), if(equals(dayOfWeek(addDays(utcNow(), 4)), 0), 1, 2), 0), 4)
     
    The delay action to delay sending task due reminders configured with the variable:
     
    Obviously, you could just use the above expression in the count field as well. If you do, you should wrap it in an int() expression: int(add(if(or(equals(dayOfWeek(addDays(utcNow(), 4)), 0), equals(dayOfWeek(addDays(utcNow(), 4)), 6)), if(equals(dayOfWeek(addDays(utcNow(), 4)), 0), 1, 2), 0), 4))
  • David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    If it helps, below is an explanation of the expression from Copilot. The number 4 in the expression can be replaced with whatever number of days you want for your delay.

    Sure! Let's break down this Power Automate expression step by step:

    1. addDays(utcNow(), 4): This part adds 4 days to the current UTC date and time.

    2. dayOfWeek(addDays(utcNow(), 4)): This gets the day of the week for the date 4 days from now. The result will be a number from 0 (Sunday) to 6 (Saturday).

    3. or(equals(dayOfWeek(addDays(utcNow(), 4)), 0), equals(dayOfWeek(addDays(utcNow(), 4)), 6)): This checks if the day 4 days from now is either Sunday (0) or Saturday (6).

    4. if(or(...), if(equals(dayOfWeek(addDays(utcNow(), 4)), 0), 1, 2), 0): If the day 4 days from now is Sunday or Saturday, it further checks:

      • If it's Sunday (0), it returns 1.

      • If it's Saturday (6), it returns 2.

      • If it's neither, it returns 0.

    5. add(if(...), 4): Finally, it adds the result of the if statement to 4.

    So, the expression calculates a value based on the day of the week 4 days from now:

    • If it's Sunday, the final result is 5 (4 + 1).

    • If it's Saturday, the final result is 6 (4 + 2).

    • If it's any other day, the final result is 4 (4 + 0).
  • scorpio24 Profile Picture
    280 on at
    Hi @David_MA thank you for the explanation. I've got it after replacing number 4 with 10 which is my actual goal (10 days) similar to @VictorIvanidze screenshot. Thank you guys!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard