Answers for "local time into unixtime in swift 4"

0

convert secondsfrom1970 to date swift

let epochTime = TimeInterval(1429162809359) / 1000
let date = Date(timeIntervalSince1970: epochTime)   // "Apr 16, 2015, 2:40 AM"

print("Converted Time \(date)")         // "Converted Time 2015-04-16 05:40:09 +0000\n"
Posted by: Guest on June-12-2020
0

convert secondsfrom1970 to date swift

var epocTime = NSTimeInterval(1429162809359)

let myDate = NSDate(timeIntervalSince1970: epocTime)
println("Converted Time \(myDate)")
Posted by: Guest on June-12-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language