开发者

Converting ex. 2009-12-31T00:00:00.0000000-05:00 format to NSDate

I am working with getting data from webservice in iPhone app and getting a date in format 2009-12-开发者_如何学JAVA31T00:00:00.0000000-05:00.. How can I convert this to NSDate.. Please help....


The problem with this format is that the -05:00 format is not supported by NSDateFormatter date formats.

Unicode date format patterns says it supports -0500 though. You may have to manually strip the colon out of the timezone and then parse it using the format yyyy-MM-dd'T'HH:mm:ss.0000000ZZZ (or maybe yyyy-MM-dd'T'HH:mm:ss.SSSZZZ)


Please follow this link and try taking your date in string format...the convert it to NSDate

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜