I want to convert the following date: 2010-02-01T13:58:58.513Z
Which is stored in a NSString
to and NSDate
.
The following however just shows "NULL" in the debugger
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"YYYY-MM-DDTHH:MM:SS.tttZ"];
NSLog(@"Output: %@", [formatter dateFromString:@"2010-02-01T13:58:58.513Z"]);
[formatter release];
Ideas?