How Can I Filter Records Older Than 10 Business Days in the Table

Hi everyone,

I need to filter a datatable. I need to list records older than 10 BUSINESS DAYS.

Does anyone know a simple way to do this?

Hi @mazlumkacar,

What are the columns of the datatable ?
We need some criteria to filter the records based on date.
Should be some date column also . Can you share your column headers

Thanks !

@Shikhar_Tandon

It has many columns and the date column name is “Open Date”.
I have to transfer the records with the “Open Date” column older than 10 business days to a separate table

@Shikhar_Tandon

It has many columns and the date column name is “Open Date”.
I have to transfer the records with the “Open Date” column older than 10 business days to a separate table

@mazlumkacar
find starter help here:
DT_FilterDates_Yesterday.xaml (8.3 KB)

in your case just the filter criteria has to be modified. For further help, if needed, just specify the older than 10 business days more in detail. Older from which date? Today, specific date etc.

from today.

normally i could do that as now.adddays(-10) but now i don’t know how to adapt it for work day:(

@ppr

@mazlumkacar
have a look on this essential approach:
Variables:

Flow:

grafik

Find starter help here:
getLast10BusinessDays.xaml (8.3 KB)

Kindly note:

  • cross check within your cultureInfo the numbers for Sunday / Saturday - DayOfWeek
  • any local Holidays are not taken into account, maybe you can incorporate by correction list. But depends on the complexity of your requirements
1 Like

Hi @mazlumkacar,

In addition to what @ppr suggested, you could use a temparory excel file and in any cell use the NETWORKDAYS.INTL OR NETWORKDAYS as formula.

How To —> Excel formula in Write Cell - Build - UiPath Community Forum

Then its simply to read the value from the excel cell you pasted the formula in. This way you get the total workingdays between two dates. Which you could use in your Date Difference logic or filter datatable.

hey @ppr and @jeevith

Thanks for your perfect answers.
I realized that there is a package for business days. And it works: https://connect.uipath.com/marketplace/components/get-next-previous-working-day/media

Thanks again,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.