I have a problem in sorting a date format inside an excel. I have tried using Sort Data Table activity and the result doesn’t work as expected.
I would like to remove rows that contains a duplicate ID with the oldest date. Hence, I tried to sort the date first into a latest date and use remove duplicate rows activity (still not sure if this works).
Original Format as below:
Result after use Sort DataTable activity:
I have tried using other ways that I found in the forum but it doesn’t work:
(From row In DT Order By DateTime.ParseExact(row.Item(“Date”).ToString, “dd-MM-yy”, System.Globalization.CultureInfo.InvariantCulture) Descending Select row).CopyToDataTable
(From x In SiebelDT.AsEnumerable() Order By convert.ToString(x(“ID”)),convert.ToString(x(“Date”)) Select x).CopyToDataTable