I have a list of string lists that contains DateTime values converted to strings. There are other values in the list, so I can't make the list a full DateTime list.
I have a line of code that sorts the list, but it sorts the dates by their string value, not DateTime value (which is what I want). How can I modify my code to correctly sort by the DateTime?
//This sorts the parent list by the 2nd column of the child list
List.Sort((a, b) => -1 * a[1].CompareTo(b[1]));
edit:
Sample List Contents:
Value1, 2010-06-28 10:30:00.000
Value2, 2010-06-27 10:30:00.000
Value2, 2010-06-26 10:30:00.000