ios - Date Format of full date response -


this question has answer here:

i have date string:

2014-03-09t00:00:00+01:00

tried parse timestamp using code:

nsdateformatter * dateformatter = [[nsdateformatter alloc] init]; [dateformatter setdateformat:@"yyyy-mm-dd't'hh:mm:ss"]; nsdate *date = [dateformatter datefromstring:response]; nslog(@"%@", date); nstimeinterval timestamp = [date timeintervalsince1970]; 

but returns nil in nslog. proper dateformat date string?

i use same date format in android app , works not in obj-c.

try this:

[dateformatter setdateformat:@"yyyy-mm-dd't'hh:mm:ssxxx"]; 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -