What is the NSFormat required for a string like this?
Fri, 15 Jun 2012 15:37:38 GMT
I'm trying to create a NSDate object from it. thanks
Use the following
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"EEE, dd MMM yyyy HH:mm:ss z"];
NSDate *date = [formatter dateFromString:@"Fri, 15 Jun 2012 15:37:38 GMT"];
NSLog([date description]); //2012-06-15 15:37:38 +0000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With