Determining Prior Business Day

We have a process we are automating that we need to go back to the prior business day not just date=TODAY()-1. This is not for scheduling. This is for filtering a datatable. Does anyone know how to accomplish this? It will need to incorporate not only weekends but also holidays.

I will appreciate any guidance you can provide.

Thank you,
Laura

1 Like

This is not a function in VB.NET or UiPath because the list of holidays are different for each user.

At our company we solve for this by having an excel workbook that is manually updated once per year with the list of holidays as they are known. Then we have a shared workflow that looks at this workbook and outputs PreviousBusinessDay and CurrentBusinessDay as 2 datetime variables.

There are other ways to work around it, but you have to create and manually maintain the solution yourself to make sure the list of holidays stays updated regardless of how you decide to implement

1 Like

Hey @Dave,
Not sure if I am wrong here, can we use some functionality to integrate with any one of the calendar, since every year the calendar changes, and if we relay on single calendar type won’t we get the business day and previous day.

I am not sure this is just a thought process.
Correct me or give some suggestion on this.

Regards,
Pavan H

I dont really understand what you’re asking, but I attached the excel file and workflow that is used to check current and previous business day.

Note that if you run it on a holiday, then current business day will be > today

bankbusinessday.zip (9.1 KB)

1 Like

Hey @Dave

I was checking do we have any option to refer into a calendar like (google calendar), for every year so that it will be easy to assign business day , previous day and other details.

Regards,
Pavan H

Hey @Dave
Some thing related to this post : Using Google Calendar for scheduling Orchestrator jobs

Regards,
pavan H

@pavanh003 Yes you most likely could create something with that. If you follow in the instructions in the link you should be able to modify it in a way that you want. I personally won’t do it because it won’t save much/any time for our company, plus we don’t have access to the google suite for security purposes anyways.

I just provided one example of how you can determine prior business day as that’s how we’re currently doing it and it is very quick/easy to implement with a small amount of annual maintenance required. Automating it further would not save enough time to justify the time spent on the automation :slight_smile:

1 Like