title: convert date format from "mm/dd/yyyy hh:mm:ss a" to "dd MMM yyyy" in swift
body: <p>I tried to convert from 11/17/2017 to 17 Nov 2017 but got this date 17 jan 2017.
  Here is the code that i have try.</p>
  
  <pre><code>func convertDateFormater(_ date: String) -&gt; String
  {
      let dateFormatter = DateFormatter()
      dateFormatter.dateFormat = "mm/dd/yyyy hh:mm:ss a"
      let date = dateFormatter.date(from: date)
      dateFormatter.dateFormat = "dd MMM yyyy"
      return  dateFormatter.string(from: date!)
  
  }
  print(convertDateFormater("11/17/2017 12:24:41 PM"))
  </code></pre>
  
  <p>Output : - 17 jan 2017</p>
  
  <p>Can anyone help me where i'm doing mistake.</p>
  
  <p>Thanks</p>