当前位置: 首页 > 工具软件 > ZHPickView > 使用案例 >

ios开发之--ZHPickView输出格式不出现 +0000

文彭祖
2023-12-01
这样写就不会输出 +0000了

NSDate *select = [_datePicker date];

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

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

_resultString=[dateFormatter stringFromDate:select];

输出+0000的原因是 

_resultString=[NSString stringWithFormat:@"%@",_datePicker.date];

这样输出的;

 

转载于:https://www.cnblogs.com/hero11223/p/7581973.html

 类似资料: