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-31T00:00:00.0000000-05:00.. How can I convert this to NSDate.. Please help.... 回答1: 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