How would I convert an NSString
like \"01/02/10\" (meaning 1st February 2010) into an NSDate
? And how could I turn the NSDat
The above examples aren't simply written for Swift 3.0+
Update - Swift 3.0+ - Convert Date To String
let date = Date() // insert your date data here
var dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd" // add custom format if you'd like
var dateString = dateFormatter.string(from: date)