How to convert a milliseconds timestamp to date and time in iOS/XCode? -


i have timestamp measured in milliseconds since january 1, 1970, 00:00:00 utc.

eg. input "takeofftime": "1396614600000" output in date format

you can doing following:

[nsdate datewithtimeintervalsince1970:1396614600000/1000];

this give 2014-04-04 12:30:00 +0000. should read on how pass messages (call methods) here: how can call method in objective-c?


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -