0

Possible Duplicate:
Sort NSArray of date strings or objects

Hello, I want to sort an NSMutableArray. The MutableArray contain NSstrings.Strings have this form "20112505" YYYY-MM-DD . How can i sort it ? thank you

Community
  • 1
  • 1
user567
  • 3,712
  • 9
  • 47
  • 80
  • 2
    Your example date doesn't match your format string. If the format string is correct, you can just sort lexicographically using the `sort` methods on NSMutableArray. – Ben Zotto May 25 '11 at 14:46

1 Answers1

2
[yourMutableArray sortUsingSelector:@selector(compare:)];
DenverCoder9
  • 3,635
  • 3
  • 31
  • 57