我想从日期字符串中获取 NSDate 对象,但它返回 nil。我究竟做错了什么?谢谢!
NSString *dateString = @"2012-04-05T13:27:32.369Z";
NSDateFormatter* df = [[NSDateFormatter alloc]init];
[df setDateFormat:@"YYYY-MM-dd'T'HH:mm:ss.SSSZ"];
NSDate* date = [df dateFromString:dateString];
NSLog(@"1%@",date);
[df release];