I want to sort a list of strings which are formatted to be parsed to dateTime
for example :
19-06-2014
18-06-2014
17-06-2014
// all are strings
with this block of code :
var orderedList = newlist.OrderByDescending( x => DateTime.Parse(x)).ToList();
this gives me the following exception : String was not recognized as a valid DateTime.
As far as i know XX-XX-XXX is correct if you want to parse it to dateTime ?