Hello, I have 2 data tables (one from read range in Excel and the other from reading a Sharepoint List).
I am trying to compare these columns:
SharePoint List data table (masterlistDT) column: Last_x0020_Day_x0020_of_x0020_Em
TO
Excel data table column (excelDT): Last Day of Employment
Both these columns are in DateTime format (excel and sharepoint).
What I need to do is to find rows in masterlistDT where the column Last_x0020_Day_x0020_of_x0020_Em (which has null data) is not equal to the column Last Day of Employment in excelDT (this has date data)
This is what I have used:
masterlistDT.AsEnumerable().Where(function(row) Not excelDT.AsEnumerable().Select(function(r) r(“Last Day of Employment”).toString).Any(function(x) x = row(“Last_x0020_Day_x0020_of_x0020_Em”).toString)).CopyToDataTable()
But it’s always giving me 0 rows matched, although I have at least 2 rows where it should match i.e. blank in masterlistDT’s column but has data in excelDT’s column.
Would appreciate any help. Am out of ideas. Thanks very much!
Both these columns are formatted as DateTime. However, there is only date information in the