views:

47

answers:

1

I have a string like this, 285298171.84336197376251220703

and I know it's created by CoreData and I want to find a way to convert it into ISO format, can anyone help me?

Thanks in advance.

Added: actually this is in an XML file which an application created. 285298171.84336197376251220703 281021264.12619298696517944336

+1  A: 

Without more context, it's impossible to be sure, but you're almost certainly observing a string-ified NSTimeInterval (a typedef'd double) that represents the number of seconds since a reference date. You want the uderlying NSDate that it represents which you can convert to any standard string format via NSDateFormatter.

Barry Wark