How to turn a NSString into NSDate?
问题 Ive been racking my brains with no luck. Could someone please tell me how i would convert this string: "2011-01-13T17:00:00+11:00" into a NSDate? 回答1: The unicode date format doc is here Also, for your situation, you could try this: // original string NSString *str = [NSString stringWithFormat:@"2011-01-13T17:00:00+11:00"]; // convert to date NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; // ignore +11 and use timezone name instead of seconds from gmt [dateFormat setDateFormat: