cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bondy_07
Frequent Visitor

Add days to a date, excluding weekend

Hi there, I am trying to add 1 day to a datefield Chockersdate, excluding Weekends.

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Dual Super User II
Dual Super User II

Hi @bondy_07 

 

use expressions

if( equals(dayOfWeek(addDays(utcNow(),1)),'5'),addDays(utcNow(),3),if( equals(dayOfWeek(addDays(utcNow(),1)),'6'),addDays(utcNow(),2),addDays(utcNow(),1)))

 

you can replace utcNow() with your datefield value

 

above code will check - if day of week is 5 (friday) - add 3 days

if day of week is 6 (saturday) - add 2 days

else add 1 day

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
RezaDorrani
Dual Super User II
Dual Super User II

Hi @bondy_07 

 

use expressions

if( equals(dayOfWeek(addDays(utcNow(),1)),'5'),addDays(utcNow(),3),if( equals(dayOfWeek(addDays(utcNow(),1)),'6'),addDays(utcNow(),2),addDays(utcNow(),1)))

 

you can replace utcNow() with your datefield value

 

above code will check - if day of week is 5 (friday) - add 3 days

if day of week is 6 (saturday) - add 2 days

else add 1 day

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,077)