convert secondsfrom1970 to date swift code example
Example 1: swift string time to epoch
let date = NSDate()
let unixtime = date.timeIntervalSince1970
Example 2: convert secondsfrom1970 to date swift
let epochTime = TimeInterval(1429162809359) / 1000
let date = Date(timeIntervalSince1970: epochTime)
print("Converted Time \(date)")
Example 3: convert secondsfrom1970 to date swift
var epocTime = NSTimeInterval(1429162809359)
let myDate = NSDate(timeIntervalSince1970: epocTime)
println("Converted Time \(myDate)")