时间戳转时间

NSDate *date = [NSDate dateWithTimeIntervalSince1970:[NSString stringWithFormat:@"%@",IncomeModel.tradeTime].doubleValue / 1000];

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];

[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];

NSString *destDateString = [dateFormatter stringFromDate:date];

NSLog(@"%@",destDateString);

你可能感兴趣的:(时间戳转时间)