Hey All!
I am trying to conditionally delete data rows in a data table. Basically, in one column is a date and if it is older than 45 days from today I need to remove it.
What is a way to do this?
Thanks again for all the help!
-James Mills
Hey All!
I am trying to conditionally delete data rows in a data table. Basically, in one column is a date and if it is older than 45 days from today I need to remove it.
What is a way to do this?
Thanks again for all the help!
-James Mills
Lolz… I actually figured it out…
If anyone stumbles on this looking for help here is the solution:
convert data table to array of data row using:
varArray = varDT.select
then use a for each on the varArray using system.data.datarow
So for each row in varArray
add an if statement and if a row matches the statement use:
varDT.Rows.Remove(row)
This works because VarArray is just a reference to the Data table.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.