check your date format
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"];
change into
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
Swift
check your date format
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
change into
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
1
solved Converting a NSString to NSDate