I have excel in which column name “Posting Date” contains dates. I need to remove all rows which contains the dates greater than or equal to current date +1. How to do this . Can someone help. I used for each loop and if activity but it takes so much time when there is large data. Please suggest
June 13, 2022, 12:18pm
try filter datatable and make sure you select
under condition set datecolumn =
this is assuming your date format is dd/MM/yyyy otherwise change it to your own format
will it work for >= operator?
June 13, 2022, 12:21pm
set condition to
Date >= Now.AddDays(1)
Check the Below Linq Expression :
DT = DT.AsEnumerable.Where(Function(x)Not(CDate(x("YourDateColumn").ToString)>=Now.AddDays(1))).CopyToDatatable
DT is your Input Datatable, we can assign the filtered data back to the same datatable or Create a Clone of Input Datatable and assign the filtered data to it.
Let us know if the above Expression doesn’t work or it gives out an error.
It is not working for my excel. Could you please have a look. Attaching code and excel file for reference
test.xaml (8.6 KB)
GL_List13_6_2022.xlsx (12.5 KB)
Can you Check the Below Workflow :
test.xaml (10.4 KB)
The Query is Updated as below :
June 16, 2022, 1:59pm
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.