0
을 얻는 사람이NSFormatter 및 NSdate 문제가 발생했습니다. 있는 NSDate 객체는 null
입력 날짜를 도와주세요 수있는 이유를 알고 나는 날짜가 null 얻고 난 그나마 : @ "2012년 6월 14일을 - 세계 협정시 00시 00분 0초"
예상 출력 : @ "2012년 6월 14일"
NSString *rawDate = @"June 14, 2012 - 00:00:00 UTC";
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]];
[dateFormatter setDateFormat:@"MMMM dd, yyyy - HH:mm:ss"];
NSDate *date = [dateFormatter dateFromString:rawDate];
NSLog(@"Check the string date: %@", date);