I'm trying to find the straight forward way to sort a single array of dates.
here is a sample...
i want this:
12/27/2005
12/28/2005
01/01/2006
01/02/2006
01/04/2006
01/05/2006
12/29/2005
12/30/2005
12/31/2005
01/03/2006
to look at this:
12/27/2005
12/28/2005
12/29/2005
12/30/2005
12/31/2005
01/01/2006
01/02/2006
01/03/2006
01/04/2006
01/05/2006
any clues?
Sort Array by Date
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Mike14 pointsPosted Nov 3, 2005, 9:02 AM EST
First initialize 3 DT variables:
DateTime d1= new DateTime(2005,10,20); DateTime d2= new DateTime(2005,7,22); DateTime d3= new DateTime(2005,12,25);DateTime [] dates = {d1,d2,d3};
Call the Array.Sort static method:
Array.Sort(dates)