A bit late for the party, but this is what I did today in Swift:
let df = NSDateFormatter()
df.locale = NSLocale.currentLocale()
df.timeStyle = .MediumStyle
df.dateStyle = .MediumStyle
println("Date: \(df.stringFromDate(obj.dateSent!))")
Depending on the settings of your OS area, the output should look like this (I'm in Germany):
Date: 27.11.2014 12:30:39
Note. I just thought that a lot more people are stumbling over this question, so I think that it canβt hurt to answer.
source
share