This thread should get you started. It is discussing alpabetic sorting, but the priciples are the same for dates. Post back with your code or any problems.
[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
Brute force method (bubble sort):
Say the array of dates is a()
[tt]
For i=0 To UBound(a)
For j=i+1 To UBound(a)
If CDate(a(i))>CDate(a(j)) Then
tmp=a(i)
a(i)=a(j)
a(j)=tmp
End If
Next
Next[/tt]
Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.