title: How to convert string date time format to another format using Swift
body: <p>In my scenario, I am trying to convert date time string one format to another format <code>26 Nov, 2019 - 2:53 AM to</code> <code>yyyy-MM-dd h:mm:ss</code>. How to cover the format?</p>
  
  <p><strong>Below Code Returning Empty</strong></p>
  
  <pre><code>let dateString = "26 Nov, 2019 - 2:53 AM"
  let dateFormatter = DateFormatter()
  dateFormatter.dateFormat = "yyyy-MM-dd hh:mm a"
  dateFormatter.locale = Locale.init(identifier: "en_GB")
  let dateres = dateFormatter.date(from: dateString)
  print(dateres)
  </code></pre>