iOS NSDateFormatter 时间格式

NSDateFormatter * formatter = [[NSDateFormatter alloc]init];
    [formatter setDateStyle:NSDateFormatterMediumStyle];
    [formatter setDateFormat:@"yyyy/MM/dd mm:ss"];
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:model.createdTime];
    NSString *time = [formatter stringFromDate: date];

你可能感兴趣的:(iOS NSDateFormatter 时间格式)