How to filter Date on UiPath by using Excel

Hi, everyone!
Please, I need some help. I’m trying to filter the following date: 01/10/2022 (in PT format) from Excel Date & Time column, but I’m stuck on this activity. I tried to filter by using “Excel Filter”, but didn’t work. None information appears:
image

I also tried “Filter Data Table” activity, however I don’t know why the string"DataTable.Select(“Data & Hora=01/10/22”).CopyToDatatable" is not working.

I really appreciate your help!

Follow xlsx:
Relatório_Infracoes_16_11_2022.xlsx (805.5 KB)

Hello,

I think that your issue is that the day and month gets inverted, so “01/10/2022” becomes “10/01/2022”.

You can resolve this by either changing the cultureinfo or use the “preserveformat” attribute while reading the excel file.

Here is an xaml using “preserveformat”.
Filtre_Excel.xaml (9.3 KB)

Hola,

intenta de la siguiente manera, en tu actividad read range vas activar la propiedad PreserveFormat

Luego puedes filtrar utilizando el siguiente codigo

dtInput.AsEnumerable().Where(Function(x) x("Data & Hora").ToString().Trim().Contains("01/10/2022")).CopyToDataTable()

Resultado

Saludos!

Hi @ruben.souza ,

Try below code
DataTable.Select("[Data & Hora]='01/10/22'").CopyToDatatable

Regards,
Arivu