In Objective-C: is there an easy way, like in Excel and SAS, to convert an integer to a datetime string?
In Excel, you format "mmm dd, yyyy hh: mm: ss".
For example, if I had an integer: 1328062560
and I want the result to be: 2012-01-31 21:16:00
or even (as in Excel): January 31, 2012 21:16:00
PS: I do not want to be too demanding, but I would like simple and built-in for use in NSLog, so I can write just for debugging
NSLog ("Time as integer% d and as date% mmmddyyyyhh: mm: ss", [array objectAtIndex: i], [array objectAtIndex: i]);
source
share