I have a List
with dates.
My list is:
{\"01/01/2013\",\"10/01/2013\",\"20/01/2013\"}
I want to sort the list
Because they are the UK/AUS format (Day/Month/Year), you can sort them using OrderByDescending
:
List dates = new List() { "01/01/2013", "10/01/2013", "20/10/2013" };
foreach (var date in dates.OrderByDescending(x => x))
Console.WriteLine(date);
Personally I would convert them to DateTime
objects first..