Hey guys,
I am currently improving a workflow of a holiday approval tool.
I am stuck at a particular problem. That is, the planner currently includes weekends into the "# of days of paid leave".
The employees enter the start date of their desired vacation and the end date.
What I want to do is with a foreach-Loop to evaluate each day with the "DayOfWeek" function to see whether it's a saturday or sunday and subtract these two days. So let's say an employee wants to have 7 days of vacation, only 5 days should be subtracted from his "yearly paid leave contingent".
Question: How can I "fill in the gaps" between start and end date?
Kind Regards
Sascha
Hi Yueyun,
thank you very much for your reply,
I tried to implement it but it doesn't quite work.
The Flow Trigger is a line added to a Sharepoint list, and I tried everything that I came uo with, but your first code gives me an error:
InvalidTemplate
Unable to process template language expressions in action 'Get_Dates' inputs at line '0' and column '0': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
The type of the columns in the sharepoint list is "Time/Date".
What do I have to change?
Hi , @SaschaSchroeder
According to your description, you want to extract the workdays from the start date and the end Date.
I test it in my side , this is my test flow:
If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance!
Best Regards,
Yueyun Zhang
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2