Search the next working day without holiday

Hi all

I want to create “next working day” searching RPA

Saturday/Sunday/Holiday will not be included in “next working day”

I have a list of holiday, but i dont know how to filter these holiday from the list

For example, i will search Nextworkday=Datetime.today.Adddays(1), if nextworkday is

saturday/sunday/holiday, it will move to next day until it is not saturday/sunday/holiday

Please help to give suggestion for me

thank you

1 Like

Hey,

You can use a Loop : use Nextworkday.DayOfWeek to check if its a saturday/sunday. And for the hollidays, you have to create a list of week number from your holiday list. And then check if Nextworkday.GetWeekOfYear is in your list. If not, everythings is good so break to end the loop, in the other case continue with an Adddays(1).

Have fun :slight_smile: