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
Post a Comment