title: How to convert date yyyy-mm-dd'T'HH:mm:ss.SSSZ in swift
body: <p>I am convert date from <strong>"yyyy-mm-dd'T'HH:mm:ss.SSSZ"</strong> to <strong>"dd-mm-yyyy"</strong> and my date is <strong>"2018-09-11T09:53:25.000+0000"</strong> and this is my code</p>
  
  <pre><code>let dateFormatter = DateFormatter()
  dateFormatter.locale = Locale(identifier: "en_US_POSIX")
  dateFormatter.dateFormat = "yyyy-mm-dd'T'HH:mm:ss.SSSZ"
  
  let dateFromInputString = dateFormatter.date(from: "2018-09-11T09:53:25.000+0000")
  
  dateFormatter.dateFormat = "dd-mm-yyyy"
  
  if(dateFromInputString != nil){
     return dateFormatter.string(from: dateFromInputString!)
  }
  else{
     debugPrint("could not convert date")
     return "N/A"
  }
  </code></pre>
  
  <p>but i am getting converted date <strong>11-23-2018</strong> like this</p>
  
  <p>But my aspect is <strong>11-09-2018</strong></p>