NSDate *date = [NSDate date];
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
dateFormat.dateFormat = @"MMMM FF yyyy";
NSString *dateStr = [dateFormat stringFromDate:date];
NSDateFormatter *timeFormat = [[NSDateFormatter alloc] init];
timeFormat.dateFormat = @"HH:mm aa";
NSString *timeStr = [[timeFormat stringFromDate:date] lowercaseString];
NSLog(@"%@ at %@", dateStr, timeStr);
Now I got my solution like this "February 15 2014 at 04:30 pm" but I need like this "February 15th 2014 at 04:30 pm". That is, I want it to say "15th" instead of just "15".
How do I do that?