I am trying to Convert a String into Date using Date Formatter .
var dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = \"yyyy-MM-dd’T’HH:mm:ss’Z’\"
va
Try like this:
let dateFormatter = NSDateFormatter()
dateFormatter.calendar = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian)
dateFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX")
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
let availabletoDateTime = dateFormatter.dateFromString("2015-07-16T08:00:00Z")