title: How do I format JSON Date String with Swift?
body: <p>I make an http get request to a server and get back a json object with a date string like this:</p>
  
  <pre><code>{
      name = "Place1";
      temperature = 79;
      humidity = 68;
      reported_at = "2013-07-21T19:32:00Z";
  }
  </code></pre>
  
  <p>I want to format the reported_at key so I can display a readable date and time to the user. </p>
  
  <p>This is the swift code I am trying which keeps returning nil, as it cannot format the date. </p>
  
  <pre><code>    var str = "2013-07-21T19:32:00Z"
  
      var dateFor: NSDateFormatter = NSDateFormatter()
      dateFor.dateFormat = "yyyy-MM-dd'T'HH:mm:ss:SSS"
  
      var yourDate: NSDate? = dateFor.dateFromString(str)
  
      println(yourDate)
  </code></pre>
  
  <p>How can I format this date and time with Swift correctly? I want to display the date and time to the user so they can know when the reading was taken. </p>