cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gabrielrosa94
Helper I
Helper I

DateAdd considering the weekends btween the dates

Hello. 

 

I have a field on my app that I want to show when a production is expected to end. But I can't count on weekends, so I need to know how many weekends I have to make up for them. 

 

This is the logic:

 

StartDate + datesbetween(StartDate, EndDate) + WeekendsBetween(StartDate, EndDate)

 

Ex: 

- StartDate: 03/11

- EndDate (calculated by adding the necessary days to produce, let's suppose it is 3 days):  03/11 + 3 = 03/14

// But (03/13 and 03/14 are at the weekend) so WeekendsBetween= 2

03/11 + 3 + 2 = 03/16

1 REPLY 1
WarrenBelz
Super User
Super User

Hi @gabrielrosa94 ,

Here is a good document explaining the process.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,750)