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?
Loading
MikePosted Nov 3, 2005, 2:02 PM
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);Put them in the array:
DateTime [] dates = {d1,d2,d3};
Call the Array.Sort static method:
Array.Sort(dates)