Hi All,
Can someone help in filtering data table with filter:
Remove rows when Status column is 64 and Created on is Current date-1(format 05/15/2023 00:00:00).
Hi All,
Can someone help in filtering data table with filter:
Remove rows when Status column is 64 and Created on is Current date-1(format 05/15/2023 00:00:00).
you can use filter data table
Hi @Sushmitha_G1 ,
You can either use “filter data table” or below Linq code to achieve the same.
(
From rows In Input_DT
Where Not (rows("Status").tostring="2" And rows("Status").tostring=Now.AddDays(-1).ToString(“MM/dd/yyyy 00:00:00”))
Select rows
).CopyToDatatable
Let me know if you have any doubts on the same.
Regards,
Ashutosh Gupta
Hi @Sushmitha_G1 ,
Welcome to the Community!
First way is to use the Filter Data Table Activity: Where you can pass the column name as “Status” = “64” AND “Created On” = Now.AddDays(-1).ToString(“MM/dd/yyyy”) OR “Created On” = Now.AddDays(-1).ToString(“MM/dd/yyyy 00:00:00”)
Second way is: FilteredRecords= RecordsDt.AsEnumerable.Where(Function(r) conditions using and/or).CopyToDataTable
Welcome to the community
Its the same requirement…attached a file as well please check
Cheers
Hi Ashutosh,
I tried this and it worked. Thanks much.
Thankyou Aditya.
I tried first way before posting here. but it didn’t work.
Thankyou Anil.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.