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 Apps
Unanswered

Business Days only

(0) ShareShare
ReportReport
Posted on by 1,257 Super User 2024 Season 1

I'm using the following function to add X amount of business days (TxtSLACalc.Text) to a date.   It counts business days correctly to a point (it skips weekends in the middle) however if the resulting end date is on a Saturday or Sunday it shows that instead of the following Monday or the preceding friday?  What adjustment to this calculation do I need to make?

 

 DateAdd(
 DPAssignedDate.SelectedDate,
 Value(TxtSLACalc.Text) + 2 * If(
 (Weekday(
 DPAssignedDate.SelectedDate,
 StartOfWeek.Monday
 ) + Value(TxtSLACalc.Text)) > 5,
 RoundDown(
 (Value(TxtSLACalc.Text) - (5-Weekday(
 DPAssignedDate.SelectedDate,
 StartOfWeek.Monday
 ))) / 5,
 0
 ) 
 )
 )
 

  

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @vffdd 
    Have you read this blog post by Microsoft?  It will show exactly how to do it 🙂


    Link To Post

    https://powerapps.microsoft.com/de-de/blog/excluding-weekends-and-holidays-in-date-differences-in-powerapps/ 

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard