Created
November 29, 2014 07:11
-
-
Save matsuhisa/4d16413b06f832ce82dc to your computer and use it in GitHub Desktop.
Swiftで文字列からNSDateに変換する ref: http://qiita.com/matsuhisa@github/items/954ae6e921b5c48a5814
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
var date_string: String = "2014-12-01 10:00:00" | |
var date_formatter: NSDateFormatter = NSDateFormatter() | |
date_formatter.locale = NSLocale(localeIdentifier: "ja") | |
date_formatter.dateFormat = "yyyy/MM/dd HH:mm:ss" | |
date_formatter.dateFromString(date_string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment