format date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have file names as 01012003,01022003...02012003,02022003....31112004..etc.
I want to sort them as year,month and year by increasingly.I tried
DateTime,GetFormat() but I couldn't...How???

Thanks...
 
Assuming you have the file names in an array of strings, I'd create another
array of strings in the same order but has the file names converted to format
you want to sort on. Then it's simply a matter using Array.Sort( newarray,
oldarray). I've found this overload on the Array.Sort method very useful.
Hope it helps you.
 
Back
Top