iOS时间格式转换无符号字符串

NSString *timestr = @"2016-07-11 08:34:22";

NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"-:"];

NSString *tempString = [[timestr componentsSeparatedByCharactersInSet: doNotWant]componentsJoinedByString:@""];

//tempString 最后的值:20160711083422

你可能感兴趣的:(iOS时间格式转换无符号字符串)