我有一个NSString *string = @"2012-10-24 23:00:00 +0000";
我想将其转换为正常格式24 october 2012
我使用以下代码。但它一直在崩溃。谁能帮我?
NSDateFormatter *dateformat = [[NSDateFormatter alloc] init];
[dateformat setDateFormat:@"yyyy MM dd HH:mm:SS zzz"];
NSDate *dateNS = [dateformat dateFromString:date];
[dateformat setDateFormat:@"dd MM yyyy"];
date = [dateformat stringFromDate:dateNS];
[dateformat release]