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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add on working days to...
Power Apps
Answered

Add on working days to Today()

(0) ShareShare
ReportReport
Posted on by 253

I am trying to, on the push of a button, set a date which is Today() + X number of working days. I cannot figure out how to get this working to account for every eventuality. I am going to be creating a number of tasks (list items) at one time using Patch and all of them will have a different Due Date (Today() + X days).

 

Thanks

Categories:
I have the same question (0)
  • chrisog Profile Picture
    213 on at

    Hi @sammybridge,

     

    It may be that the DateAdd() function could work for you. The syntax is DateAdd(date, number_of_units, unit)

     

    So in your instance, if you can pre-determine somewhere in your app for the amount of days to add for each list item, you can simply use DateAdd(Today(), number_of_days, Days), where number_of_days refers to the value assigned to this list item.

  • Verified answer
    timl Profile Picture
    36,721 Super User 2026 Season 1 on at

    Hi @sammybridge 

    In the OnSelect property your button, you can add the following code:

    Set(varDaysToAdd,3);
    Set(varResult, DateAdd(Today(),
    Value(varDaysToAdd) + 
    RoundDown(Value(varDaysToAdd) / 5, 0)*2+
    Switch(Weekday(Today()),5,If(Mod( Value(varDaysToAdd) , 5)>0,2,0),
     4,If(Mod( Value(varDaysToAdd) , 5)>1,2,0),
     3,If(Mod( Value(varDaysToAdd) , 5)>2,2,0),
     2,If(Mod( Value(varDaysToAdd) , 5)>3,2,0),
     1,If(Mod( Value(varDaysToAdd) , 5)>4,2,0))
    )
    )

    The variable varDays defines the number of days to add (3 in this example).
    The set statement stores the result of the calculation in the variable varResult.

    This formula is based on @Siennas logic to exclude to exclude Saturdays & Sundays, so the credit goes to him. 

    https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Adding-working-days-and-hours-to-a-date/m-p/98747 

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard