ios - Having trouble getting the date from a JSON call -
i pulling date json in format of "1900-01-01t00:00:00-06:00"
the code trying (and failing parse with) this
nsdateformatter *formatter = [[nsdateformatter alloc] init]; [formatter setdateformat:@"yyyy-mm-dd't'hh:mm:ss.ssszz"]; tempdate = [formatter datefromstring:trimmedstring];
i want display pull in mm-dd-yyyy format after date in correct format.
i not sure of how many sss , zz's need @ end, , have tried multiple combinations no avail. suggestions?
you need 5 "z"s
[dateformatter setdateformat:@"yyyy-mm-dd't'hh:mm:sszzzzz"];
Comments
Post a Comment