Add next working days according to calendar

Hi Everyone,

My Query
I have a calendar in orchestrator which contains non working days
I need to add next 8 days excluding weekends & holidays based on that calendar

Please provide me ur suggestions

Thanks in advance
@ppr @Yoichi @Palaniyappan

Hi @kavya.s16

The following thread might help you.


Could you please explain, where you wnat to skip weekends? In Studio (date logic) or In Orch. (scheduling bot).

@Aakash_Singh_Rawat in studio logic , i get holidays dates from orchestrator through API

@arjunshenoy should i use invoke here
also does it use calendar dates ?

Can anyone explain this logic on how to use it and how to pass input for the below link

Purpose: To get the next business/working day using UiPath Studio Code:

Problem: If you need to add certain number of days to the current date, but that next day should not be a weekend day or a holiday.

The next date is calculated from the current date.

The holiday list is taken as an in_Argument.

The number of days to be added is taken as an in_Argument.


  1. First current date is taken in format MM/dd/yy.

  2. Required number of days are added the Current date and stored as Next Date.

  3. While loop is used to check whether the Next Date is a weekend day or a holiday.

  4. If yes, then one more day is added to the Next Date. Above condition is checked again.

  5. If no, then the Next Date is the Final required date. While loop is ended.

Note- In point 3.a you can substract one day to get the earlier business day. Please check the code for reference.
Main.xaml (9.8 KB)