获取时间转成相应格式YYYYMMddHHmmss

NSDate *timeDate = [NSDate date]; NSDateFormatter *dateformatter= [[NSDateFormatter alloc]init]; [dateformatter setDateFormat:@"YYYYMMddHHmmss"]; NSString * locateStr = [dateformatter stringFromDate:timeDate]; return locateStr;

你可能感兴趣的:(获取时间转成相应格式YYYYMMddHHmmss)