iphone - How do I get a timestamp from an NSString date? -
I have an NSString date ( This has not been tested in full but it should do the trick. @ "Monday, 01 February 2010 20:25:37 +0000" / Code>) that I want to convert to a timestamp so that I can better calculate how much time has passed since the present time. How can I change the NSString date to a timestamp value?
NSDateFormatter * formatter = [[NSDateFormatter alloc] initWithDateFormat: @ "EEE, DD MMM yyyy HH: mm: SSZZZ" allowNaturalLanguage: no]; NSDT * Date = [Formattor Deaththrustring: @ "Mon, 01 Februar 2010 20:25:37 +0000"];
Comments
Post a Comment