I'm trying to modify the date format of a string in Swift.
I need to print my date to the french format :
17 mai 2015
I tried this :
var myDate = "2015-05-17 13:00:00"
var dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "d MMMM"
var readableDate = dateFormatter.dateFromString(myDate)
println("Readable date = \(readableDate!)")
I obtain a nil
value when I run the program, and I don't understand why.