只上代码
long long int date1 = (long long int)[@"1435646324" intValue];
NSDate *date2 = [NSDate dateWithTimeIntervalSince1970:date1];
NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd HH:MM:ss"];
NSString * dateStr = [formatter stringFromDate:date2];
注:本文首发于 iHTCboy's blog,如若转载,请注明来源。