Hi Team,
Hope all are safe and sound.
I have a query. I need to know how we can find out the count of week days in a month.
like if i have a variable in which i have stored a date, from that date i need to find out in that month how many weekdays are there i.e., how many days are there in that particular month except all Saturdays and Sundays.
Looking forward for your suggestions..
Hi Jishnu,
I have created similar flow , please see below steps to get count of weekends of month .
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 range
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 outside 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 this helps you , please mark as verified.
User | Count |
---|---|
27 | |
16 | |
16 | |
12 | |
11 |
User | Count |
---|---|
42 | |
30 | |
28 | |
24 | |
24 |