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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -