Get a particular record in a datatable

I have a datatable with several columns.

In this case, there are more than 11 columns.

Using for each row in a datatable, if a cell value is equal to today’s date,
the bot have to get the current row into another datatable.

Can someone please advise me what to do ?

HI @jhivesh.subron

Try this expression

dt.AsEnumerable().Where(Function(r) r(“Column name or Index”).Equals(DateTime.now.ToString(“Your Format or the format in the excel”))).CopyToDataTable

Then use write range in another sheet or excel

Hope this helps

Regards
Sudharsan

2 Likes

Hi @jhivesh.subron ,
use below query to get the current date value to another table.
dtNew=dt.select("ColumnName]='"+Now.ToString("MM/dd/yyyy")+"'").CopyToDataTable()

Regards,
Arivu

2 Likes

Use the Filter DataTable activity and put the filter condition for the column

Hi @jhivesh.subron

You can use Filter DataTable and of course we do this in multiple ways.

Please have a look on the below thread.

https://www.uipath.com/community/rpa-community-blog/four-ways-to-filter-data-table-in-uipath-studio?hs_amp=true

Thank you.

2 Likes

Hi @jhivesh.subron ,

You can use the Filter Data table activity to filter as per required with the Expression.

Thanks,

1 Like

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