As attached I need to filter the specific data from an excel I am trying with filter data table activity but it is not giving the proper output. Can anyone please guide me on this??
I need to select only “06-Jun-21” from the list of the date.
its depending on the values within the datatable after readin excel with read range.
give a try on following
Assign activity:
left side: dtFiltered | datatype: DataTable
right side:
(From d in YourDataTableVar.AsEnumerable
Let dp = CDate(d(0).toString.Trim)
Where dp.Date = New DateTime(2021,6,6).Date
Select r=d).CopyToDataTable
@ppr I tried but I am getting like as in the attachment
@Sudharsan_Ka , can you please look into this??
i tried but i didnt get the Output
In such cases WE do debug for identifying the breaking Part.
May you can Share some Screenshots on your Implementation Details Like the LINQ Statement, variables etc. Thanks
@ppr, thanks for valuable reply the mistake was I didnt the variable type, once I changed the variable type to “DateTime” it is working fine.
@HeartCatcher
Perfect.
Just do your final testing. Once it is working close the topic by marking the solving post as solution or let us know your open questions. So others can benefit from it.
You have to do following:
Read Excel File as DataTable
For Each Row in this DataTable:
Get the content of the cell.
Convert the string to date.
Compare the date with what you search for.
Some videos that could help you out:
Convert String to Date: UiPath | Convert String To Date | How to convert string to date variable | Date Manipulation - YouTube
Date Formatting: UiPath | Date Formatting | Convert date to String | Get date format | yyyy.MM.dd | dd.MM.yyyy - YouTube
Best regards
Mahmoud
If you haven’t solved the problem already. Please find the solution in the Github link.