date
is always nil, and I am not able to understand what the issue is.
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZ"];
NSDate *date = [dateFormatter dateFromString:@"2013-07-16T07:40:36.939-04:00"];
try like this,for adding hours use -
symbol and for substacting use +
symbol.
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"];
NSDate *date = [dateFormatter dateFromString:@"2013-07-16T07:40:36.939-04:00"];//chnage symbal here.
NSLog(@"%@",date);
O/P:-2013-07-16 11:40:36 +0000