I am trying to convert string to date using NSDateFormatter,but some how I am not able to do.
Here is my code:
var dateformatter = NSDateFormatter() // object of NSDataFormatter
dateformatter.dateFormat = "dd-MM-YYYY" //Format in which I want date
println(dateformatter.dateFromString("2014-12-25 00:00:00"))