I am pulling a date from JSON in the format of "1900-01-01T00:00:00-06:00"
The code I am currently trying (and failing to parse with) is this
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZZ"];
tempDate = [formatter dateFromString:trimmedString];
I then want to display what I pull in the MM-dd-yyyy format after I actually get the date back in the correct format.
I am not sure of how many SSS and ZZ's I need at the end, and have tried multiple combinations to no avail. Any Suggestions?