05-24-2020 03:41 AM
As there are not any OOB endpoint for getting working days of a month or date range. I have created this flow to get working days i.e. excluding Saturday and Sunday of Month. You can customize according to you needs.
Follow below steps :
1) Compose action to set start date of month
2) create compose action again to set end date of month using following expression :
3) Initialize variable to set Start_Date as string and value of output #1 compose
4) Initialize an array - as array output of #1 compose . This is going to be used to loop through between date rang
5) Initialize weekend incremental counter variable
6) Create Do Until loop - set 'Start_Date' and compare output value with 'Compose_3' i.e. #2 step
7) Now after Do until, create action to compose array output for 'Date_Array'
Add apply to each loop - This is going to iterate through each dates we added in 'DateArray'
9) Now After apply to each , create a new compose action with input of 'Weekend'. This is going to show you number of weekends of month.
10) Check using flow checker & Test.
If you have any questions or concerns , please feel free to reach out to me.