Skip to content

Instantly share code, notes, and snippets.

@DonMag
Last active December 4, 2015 20:21
Show Gist options
  • Save DonMag/8315ee8fa376c4d5b3c0 to your computer and use it in GitHub Desktop.
Save DonMag/8315ee8fa376c4d5b3c0 to your computer and use it in GitHub Desktop.
///////
let time = "2015-10-29T05:22:15.000000Z"
let dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSS'Z'"
//dateFormatter.dateStyle = .ShortStyle
//dateFormatter.timeStyle = .ShortStyle
// if either Style line is uncommented,
// the next line shows an error
let ldd:NSDate = dateFormatter.dateFromString(time)!
print(ldd)
@DonMag
Copy link
Author

DonMag commented Dec 4, 2015

let x = "abc"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment