Is there a good+easy way to convert an Oracle Timestamp to an NSDate object on the iPhone? I have asked my customer to give me a DB with timestamps as Unix Timestamp (doubles with 0 = start of 1970) but it seems to be a problem for them. Thanks.
Note: You can easily convert a Unix Timestamp to an NSDate with
[NSDate dateWithTimeIntervalSince1970: timestamp] // timestamp is a "double"
What I need to do is convert the Oracle timestamp to a double, aka Unix Timestamp. The rest is easy.
More info: I need Objective-C code to run on the iPhone using NSStrings that represent dates in Oracle Timestamp format. Another StackOverflow thread suggests using NSDateFormatter, but I don't know what format to use and the initialization method for the formatter suggested in that thread generates a warning for me.