views:

65

answers:

2

how to sort date using nsarray ? I have four dates , that should by display by ascending order.can you explain how to sort ? I searched so many stuff, but i can't ablt to find any thing .Please help me , is there any method for date sort.

+4  A: 

NSDate's compare: method already does what you want. Try:

NSArray *sortedArray = [unsortedArray sortUsingSelector:@selector(compare:)];
Carl Norum
A: 

I have to sort more than 10 dates , please any give samle apps.

izjack
This is not an answer to the question. You can modify the question to include additional information, if you need to.
Brad Larson