title: Converting a date (string) into another date format (string)
body: <p>I have a novice question, will be happy if any one out there can help me.</p>
  
  <p>I have an NSMutableArray, for example:</p>
  
  <pre><code>{
  JobID = 109302930;
  Subject = "Test Subject";
  SubmitDate = "2009-09-15 17:27:34";
  }
  </code></pre>
  
  <p>I am now trying to create sections in my table view and want to group my records based on "formatted" SubmitDate. For example;</p>
  
  <pre><code>16th May'09
  ===========
  Item A
  Item B
  
  18th May'09
  ===========
  Item C
  Item G
  
  20th May'09
  ===========
  Item Z
  Item K
  </code></pre>
  
  <p>I am creating this NSMutableArray with the following function (from an XML data source):</p>
  
  <pre><code>-(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName {   
      currentElement = [[NSString alloc] init];
  
      if ([elementName isEqualToString:@"subject"]) {
          [item setObject:currentSubject forKey:@"Subject"];
      } else if ([elementName isEqualToString:@"job_id"]) {
          [item setObject:currentJobID forKey:@"JobID"];
      } else if ([elementName isEqualToString:@"submit_date"]) {
          // I want to insert the date value in a formatted way instead of the standard MySQL date format (YYYY-MM-HH).
          [item setObject:currentJobSubmitDate forKey:@"SubmitDate"];
          [previewData addObject:item];
      }
  }
  </code></pre>
  
  <p>As I commented in the above code, instead of YYYY-MM-DD HH:II:SS, I want to add the date as a formatted date string. How can I do that?</p>
  
  <p>Thanks for your help.</p>