Hi @Anonymous,
It seems that you would like to get the amount of working days between two dates.
Please try with the following workaround.
Add a Button trigger.
Add Compose action for Start date:
utcNow('yyyy-MM-dd')
Add Compose 2 for End date:
addDays(utcNow(),6,'yyyy-MM-dd')
Initialize variable, set name as IndexDate, Type as String, select dynamic content Output of Compose for Value field.
Initialize variable 2, set Name as DateArray, Type as Array, Value with the following code:
array(outputs('Compose'))
Add a Do until action, select variable IndexDate for the left value field, and Output of Compose 2 for the right value field.
Within the Do until loop, add Compose 3 with the following code:
addDays(variables('IndexDate'),1,'yyyy-MM-dd')
Add action Set variable, select name IndexDate, Value set as output of Compose 3.
Add action Append to array variable, Name as DateArray, Value as variable IndexDate.
Under the Do until loop, add Compose 4, select variable DateArray as its Input.
Initialize variable 3, set Name as Weekends, Type as Integer, Value as 0.
Add an Apply to each, select output from variable DateArray.
Within Apply to each, add a Condition to check if it is Saturday or Sunday.
Or
(
dayOfWeek(items('Apply_to_each')) is equal to 6
dayOfWeek(items('Apply_to_each')) is equal to 0
)
Under If yes branch, Increment variable, Name set as weekends, value as 1.
Under the Apply to each, add Compose5, with variable Weekends as its input.
Add Compose6 with the following code to get the total days between the two dates:
length(variables('DateArray'))
Add Compose 7 to get the workdays:
sub(outputs('Compose_6'),variables('Weekends'))
Hope this could be a workaround for you.





Best regards,
Mabel