skip to Main Content

Ios swift – DateFormatter dateStyle setting order causes problems?

let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"; dateFormatter.timeZone = TimeZone.current; dateFormatter.dateStyle = .none; dateFormatter.timeStyle = .none; let date = dateFormatter.date(from: "2023-08-03 00:00:00") this date is nil, why ? let dateFormatter = DateFormatter() dateFormatter.dateStyle = .none dateFormatter.timeStyle = .none dateFormatter.dateFormat…

VIEW QUESTION
Back To Top
Search