字符串如下:
Sun, 16 Dec 2012 15:30:22 +0000
我想转化成NSDate,试过下面的代码,结果返回null值
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd hh:mm:ss a"];
NSDate *date = [[NSDate alloc] init];
date = [df dateFromString: @"Sun, 16 Dec 2012 15:30:22 +0000"];
NSLog(@"date: %@", date);
请高手指教一下,不胜感激。