2017-04-22 1 views
0

일부 속성은 "2017-06-23 15:34:48".can 형식의 날짜 형식이며 NSDate로 설정할 수 있습니다. 그러나 값이 사람이 나에게 를 도울 수있는 테이블에 삽입되지 않은 내가있는 NSDate로이 객체를 추가코어 데이터에 타임 스탬프를 삽입하는 방법

2017-06-23 15:34:48 I want to insert on this format. 
+0

참조 http://stackoverflow.com/questions/2135267/nsdateformatter - 24 시간제 – vadian

답변

0

내 솔루션 :

NSDateFormatter *df = [[NSDateFormatter alloc] init]; 
[df setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; 
NSDate *myDate = [df dateFromString:@"2017-06-23 15:34:48"]; 
NSLog(@"%@", myDate); 
관련 문제