cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RaninHa
Level: Powered On

Create event Only in business days

Hi all,

 

I would like to build a flow that creates an outlook event only if the a specific date i have is a weekday.

I've got a date field "Date1"- i would like to substract 2 days from that date, check if the resulting date is a weekday and then determine the actions according to that.

 

Any ideas how that can be done?
Help would be appreciated!
Thanks,
Ranin

2 REPLIES 2
Community Support Team
Community Support Team

Re: Create event Only in business days

Hi @RaninHa,

 

I'm not sure how your "Date1" field was created, I used compe to specify a date to do the test.
You could create your Flow in this way.

 

Use Expression—addDays() function to substract 2 days from that date. Like :  addDays(Date1’,-2)

Use dayOfWeek() function to determine if a date is the day of the week. If the result is 0 or 6, the date is not weekday.

@or(equals(dayOfWeek(outputs('substract_2_days')),0),equals(dayOfWeek(outputs('substract_2_days')), 6))

If the condition is not met, the date minus two days is weekday, and then the corresponding action is configured.

 

Image reference:

19.PNG

Take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Administrator
Administrator

Re: Create event Only in business days

Hello, @RaninHa!

Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @v-bacao-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

Thank you for being an active member of the Flow Community!

-Gabriel
Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 242 members 4,391 guests
Recent signins:
Please welcome our newest community members: