title: Convert date in MM/dd/yyyy format in xcode?
body: <p>I have a <code>UIDatePicker</code> and I m getting the selected date from it in <code>yyyy-MM-dd</code> format.Now I want to convert it to <code>MM/dd/yyyy</code> format ..How can i do it ?</p>
  
  <pre><code>NSDateFormatter *df=[[[NSDateFormatter alloc]init] autorelease];
  df.dateFormat = @"yyyy-MM-dd";
  NSArray *temp=[[NSString stringWithFormat:@"%@",[df stringFromDate:DatePicker.date]] componentsSeparatedByString:@""];
  
  [dateString2 release];
  dateString2=nil;
  dateString2= [[NSString alloc]initWithString:[temp objectAtIndex:0]];
  NSLog(@"%@",dateString2);
  </code></pre>
  
  <p>Im getting 2012-10-30 but I want 10/30/2012.</p>