NSDateFormatter *datefomate= [[NSDateFormatter alloc]init]; [datefomate setDateFormat:@"yyyy-MM-dd hh:mm:ss"];//注意这里的MM注意大小写,否则重复 NSLog(@"%@",[datefomate stringFromDate:[NSDate date]]);
NSDateFormatter *datefomate= [[NSDateFormatter alloc]init]; [datefomate setDateFormat:@"yyyy-MM-dd hh:mm:ss"];//注意这里的MM注意大小写,否则重复 NSLog(@"%@",[datefomate stringFromDate:[NSDate date]]);
转载于:https://www.cnblogs.com/liyang31tg/p/3667577.html