i get from json the following format, specifically these are two of the ones I get:
"createdAt":"2020-09-21T18:24:36.787Z",
"createdAt":"2020-09-21T18:45:05.250Z",
I used this format:
lazy var formatter: DateFormatter = {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
formatter.timeZone = TimeZone(abbreviation: "UTC+8")
formatter.locale = Locale.current
formatter.dateStyle = .medium
formatter.timeStyle = .none
return formatter
}()
however, the application only gives me back:
Sep 22, 2020
Sep 22, 2020
why is it not time?