0

I am trying to convert an ISO8601 string into a date in string, but am getting a runtime failure when doing the conversion and I'm not sure why, here's the code:

let dateString = "2022-08-16T01:27:55.000Z"
let isoFormatter = ISO8601DateFormatter()
let newDate = isoFormatter.date(from: dateString)!
Noah Iarrobino
  • 1,162
  • 1
  • 8
  • 25
  • [How to convert a date string with optional fractional seconds using codable in Swift](https://stackoverflow.com/a/46458771/2303865) – Leo Dabus Sep 28 '21 at 22:43

0 Answers0