Try this example
static void Main()
{
var list = new List<datetime>();
list.Add(new DateTime(2010, 5, 5));
list.Add(new DateTime(2010, 10, 20));
list.Add(new DateTime(2010, 1, 4));
list.Add(new DateTime(2010, 6, 19));
Display(SortMonthAscending(list), "SortMonthAscending");
}
static List<DateTime> SortMonthAscending(List<DateTime> list)
{
list.Sort((a, b) => a.Month.CompareTo(b.Month));
return list;
}
static void Display(List<datetime> list, string message)
{
Console.WriteLine(message);
foreach (var datetime in list)
{
Console.WriteLine(datetime);
}
Console.WriteLine();
}</datetime></datetime>
This should help you sorting your dates.
Cheers