Last active
August 29, 2015 14:10
-
-
Save lbehnke/0e5f3d76bb7aff03193e to your computer and use it in GitHub Desktop.
Format time passed as unix time stamp
This file contains hidden or 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 secondsSince1970 = NSDate.date().timeIntervalSince1970 | |
| var dateFormatter = NSDateFormatter() | |
| dateFormatter.dateFormat = "HH:mm" | |
| let thisDate = NSDate(timeIntervalSince1970: secondsSince1970); | |
| println("Time : " + dateFormatter.stringFromDate(thisDate)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment