Hello folks,
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.
Hello @anupam8555
I am attempting to use the Flow you have provided but am stuck on Item 4 (Initialize an array). When I use the Output of #1 Compose, I receive an error...
The variable 'DateArray' of type 'Array' cannot be initialized or updated with value of type 'String'. The variable 'DateArray' only supports values of types 'Array'.
Based on the steps provided, Compose #1 is a date.
I realize this is an older posting but wondered if you could assist?
Thanks