I know these questions are asked all the time about date formatters, however the issue I have is really odd
I need to convert a simple string to date as follows
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "MM/dd/yyyy"
let dateOfBirthString = "10/20/2002"
let dob: Date? = dateFormatter.date(from: dateOfBirthString)
This works fine in a playground but always returns nil in the app (with those exact values (albeit properties rather than hard coded strings)
Any help would be appreciated, its driving me nuts