I have an NSString @"2015-05-24T20:10:00.000Z", and I am using an NSDateFormatter with the date format @"yyyy-MM-dd'T'HH:mm:ssZ", but it always returns nil.
I am using the following code, but the output is always (null).
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
// NSString *input = @"2013-05-08T19:03:53+00:00";
[dateFormat setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"]; //iso 8601 format
NSDate *date = [dateFormat dateFromString:[dictScheduleData valueForKey:@"scheduledOn"]]; // coming from the server 2015-05-24T20:10:00.000Z
NSLog(@"Date output: %@", date);