iphone NSDate Conversion problem

后端 未结 2 1110
执念已碎
执念已碎 2021-02-06 16:47

In my graph Api for facebook..

I am getting this data.. from Json..
\"updated_time\" = \"2011-05-17T14:52:16+0000\";

and I am using this code to

2条回答
  •  鱼传尺愫
    2021-02-06 17:31

    It looks like your date format string isn't taking the letter "T" into account – and you should probably be enclosing literal text between apostrophes, just to be safe. Try:

    [df setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ssZZZZ"];

提交回复
热议问题