Filter a large amount of data and datatable manipulation

Hello All,
I have a big csv file that containq some infos with a column that has dates
So i need to filter this column of dates with the following conditions
If column date exceeds two months from now i need to add a column to the table with value “type 1”
If column date exceeds 3 months from now i need to add a column with value “type 2”.

I believe that i can do it with for each and if condition but when the file size is big it’ll take a lot of time so i need an optimized solution , any ideas please ??

Kind Regards


How about the following using invokeCode and LINQ?

If (CDate(r("date"))>Today.AddMonths(2)) Then
	If  (CDate(r("date"))>Today.AddMonths(3)) Then
    End If
End If
End Sub
) (2.8 KB)

If it doesn’t work due to your date format, can you share your input and expected output as file? It’s no problem if dummy data.


Hello Yoichi,

Thanks for your prompt reply , here is an exp of input file that need to be filtered and the output must be a data table with all the column of input file plus the column “type”…

inputFile.xlsx (17.0 KB)

Kind Regards,


Your input file is CSV isn’t it? How about the following?

Sample20230922-1L (2).zip (3.2 KB)


1 Like

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