convert secondsfrom1970 to date swift

let date = NSDate() // current date
let unixtime = date.timeIntervalSince1970

0
0
RandNoel 105 points

                                    var epocTime = NSTimeInterval(1429162809359)

let myDate = NSDate(timeIntervalSince1970: epocTime)
println("Converted Time \(myDate)")

0
0
3.6
5
Nold 110 points

                                    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"

3.6 (5 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
epoch time converter swift ios convert seconds to date swift convert seconds into date swift convert epoch date in string swift date epoch swift epoch timestamp to month swift swift get now epoch time epoch time in milliseconds to date in swift convert Unix Epoch Timestamp string to date swift date from epochtime swift epoch time to date swift swift get proper date from epoch time swift get date from epoch time swift epoch time to date nsdate().timeintervalsince1970 to second in swift nsdate().timeintervalsince1970 to second convert timestamp to hours swift 5 convert timestamp to date swift 5 converting timestamp in hours swift double to date swift timestamp to date in swift 5 swift from double to date string format converte seconds to date swift get date from timestamp swift how to convert unix utc time to normal swift timestamp to date swift how to create a swift date Unix Epoch ios swift convert time timestamp to date ios swift get date format from timestamp swift convert georgian date to unix swift how to convert timestamp to date string ios swift timesince1970 swift converter how change seconds to date in swift convert timestamp in swift local time into unixtime in swift 4 convert date double value into local date format swift 4 convert unix timestamp by code in swift calculate seconds1970 to year swift convert secondsfrom1970 to date swift convert time to seconds from 1970 swift date from unix swift how to convert epoch time to normal time swift swift convert epoch to minutes swift converting epoch to how long ago
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source