Created
May 24, 2016 18:30
-
-
Save lawrenceching/88bffd1ebef34342a4e2110b1d0328d7 to your computer and use it in GitHub Desktop.
[Swift] Convert string to NSDate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let strDate = "2016-06-01T00:00:00Z" | |
let dateFormatter = NSDateFormatter() | |
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" | |
let date = dateFormatter.dateFromString(strDate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment