0

I have number of arrays of dictionary

   points = 200;
   startDate = "Jun 04, 2011, 13:15 PM";

   points = 200;
   startDate = "May 01, 2011, 11:15 PM";

   and  -------

I have to do sorting on the basis of startDate.

I have used number of sorting's earlier like numerical.. alphabetical sorting etc via this method:

-(NSMutableArray*)SortEventsArray:(NSMutableArray*)arrayToSort :(NSString*)sortExpression
{
   NSSortDescriptor *mySorter = [[NSSortDescriptor alloc] initWithKey:sortExpression ascending:YES];
   [arrayToSort sortUsingDescriptors:[NSMutableArray arrayWithObject:mySorter]];
   return arrayToSort;
}

but its not working for Date string.

Please help

1 Answer 1

1

Chekout this

This one also

Both will help you.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.