title: How to display picker view in MM-dd-yy format in iOS 5.1?
body: <p>In my application i am using pickerview</p>
  
  <p>My problem is that when in iOS 4.3 Picker view comes MM-dd-yy format,</p>
  
  <p><img src="https://i.stack.imgur.com/WZqiF.png" alt="enter image description here"></p>
  
  <p>in iOS 5.1 Picker view comes dd-MM-yy format,</p>
  
  <p><img src="https://i.stack.imgur.com/7HbUj.png" alt="enter image description here"></p>
  
  <p><strong>I want MM-dd-yy format in iOS 5.1</strong></p>
  
  <p>My code is below,</p>
  
  <p>I created picker view programmatically with this code,</p>
  
  <pre><code>datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 250, 325, 300)];
  datePicker.datePickerMode = UIDatePickerModeDate;
  datePicker.date = [NSDate date];
  
  NSDate *today = [NSDate date];        
  NSDateFormatter *df = [[NSDateFormatter alloc] init];
  [df setDateFormat:@"MM-dd-yy"];
  NSString *dateString = [df stringFromDate:today];
  dateString = [NSString stringWithFormat:@"%@",[df stringFromDate:datePicker.date]];
  </code></pre>
  
  <p>Anybody suggest me how can i resolve this issue on iOS 5.1?</p>