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 / Task in planner, How c...
Power Automate
Unanswered

Task in planner, How can you put the Due date, 3 days after the task is assigned in works days

(0) ShareShare
ReportReport
Posted on by

 

Hi,Flow and Planner

 

I am trying to create a task, in which I have managed to assign a specific user and the designated date, however I can not create a function in which its expiration date is 3 days in work days after the one assigned in a principle. I would like to know if you can help me with this.

 

marco_suarez_a_0-1683650736390.png

 

I was trying to create a function here to be after 3 days later counting working days, without Saturday and Sunday

marco_suarez_a_2-1683650796566.png

 

 

 

 

 

 

 

 

@abm 

Categories:
I have the same question (0)
  • Craig Stewart ABZ Profile Picture
    959 Super User 2024 Season 1 on at

    On a flow I have for creating tasks I hadn't set up a due date, but using this expression seems to work
    I'm using the created date trigger triggerBody()?['Created'] as the basis for when it should be due so Monday would be due Thursday, Tue due Friday, Wednesday spans the weekend so we need to add 2 days, same for Wed/Thur/Frid, Saturday due Wednesday and Sunday also due Wednesday.

    addDays(triggerBody()?['Created'],
    if(equals(formatDateTime(triggerBody()?['Created'], 'ddd'), 'Mon'), 3,
    if(equals(formatDateTime(triggerBody()?['Created'], 'ddd'), 'Tue'), 3,
    if(equals(formatDateTime(triggerBody()?['Created'], 'ddd'), 'Wed'), 5,
    if(equals(formatDateTime(triggerBody()?['Created'], 'ddd'), 'Thu'), 5,
    if(equals(formatDateTime(triggerBody()?['Created'], 'ddd'), 'Fri'), 5,
    if(equals(formatDateTime(triggerBody()?['Created'], 'ddd'), 'Sat'), 4,
    if(equals(formatDateTime(triggerBody()?['Created'], 'ddd'), 'Sun'), 3, 0)
    )
    )
    )
    )
    )
    ), 'yyyy-MM-ddTHH:mm:ssZ')


    Hope that's of some use

  • eyau Profile Picture
    109 on at

    Hi,

     

    I've created a flow that checks if the date 3 days later is Sat/Sun and adds days until it is a Weekday. First you have to initialize a variable and set it as your desired date + an 'addDays()' expression.

    eyau_0-1683665163697.jpeg

     

    addDays(utcNow(),3,'MM/dd/yyyy')

     

    Then, using a condition, check the day of the week using the expression:

     

    dayOfWeek(variables('varDate'))

     

    And check if it is equal to 0 or 6 (Sun or Sat). If it is Sun or Sat, then use the 'Do Until' control to keep adding 1 day until it is not equal to 0 or 6 (equal to a weekday).

     

    eyau_1-1683665163698.jpeg

     

    Do Until:

     

    @And(not(equals(dayOfWeek(variables('varDate')),6)),not(equals(dayOfWeek(variables('varDate')),0)))

     

    Compose:

     

    addDays(variables('varDate'),1,'MM/dd/yyyy')

     

    The new variable will be the next available work day, which you can use to assign due dates in planner.

     

    -E

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard