title: Format "1/31/2016 5:53:21 AM" to "31 Jan'16" in iOS
body: <p>I am getting date from json in format "1/31/2016 5:53:21 AM" &amp; i want to convert it to the format "31 Jan'16"...</p>
  
  <p>I tried this code..</p>
  
  <pre><code>myDate=@"01/31/2016 05:53:21 AM";
  NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init];
  dateFormatter.dateFormat = @"dd/MM/yyyy hh:mm:ss tt";
  NSDate *dtNew = [dateFormatter dateFromString:myDate];
  dateFormatter.dateFormat = @"dd MMM'YY";
  NSLog(@"%@",[dateFormatter stringFromDate:yourDate]);
  </code></pre>
  
  <p>but <code>myDate</code> string can't convert to NSDate. &amp; <code>dtNew</code> comes <code>nil</code>.</p>
  
  <p>Anyone can help?</p>
  
  <p>Thanks in advance.!!!</p>