I’m trying to filter a DataTable based on a date. However, I keep getting this error message:
Cannot perform ‘<=’ operation on System.String and System.DateTime.
This is what I’m trying to do:
myDataTable.Select("[Completion Date] <= #"+PeriodEnd.ToString +"#").CopyToDataTable
This is an example of a date from my table:
42613 which is 31-08-2016
My PeriodEnd is the following:
But I just keep getting this error. All suggestions are highly appreciated.