I want to apologize ahead of time for asking a repeat question, but none of the other solutions have worked for me yet. Every time I try to pass a date string to the dateFro
According to NSDateFormatter documentation :
When working with fixed format dates, such as RFC 3339, you set the dateFormat property to specify a format string.
If your date format is 2017-06-16T17:18:59.082083Z then dateFormat property should look like this yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ.
Swift 3
let dateFormatter = DateFormatter()
let date = "2017-06-16T17:18:59.082083Z"
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ"
let result = dateFormatter.date(from: date) // 2017-06-16 17:18:59 +0000