【发布时间】:2013-05-15 14:49:10
【问题描述】:
我需要解析的输入日期字符串是 2013:05:14 13:24:44 我尝试使用此 NSDateFormatter 代码,但它不起作用...... 有什么想法吗?
_dateFormatter = [NSDateFormatter alloc];
[_dateFormatter setDateFormat:@"yyyy:MM:dd hh:mm:ss"];
NSLocale *usLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
[_dateFormatter setLocale:usLocale];
NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
【问题讨论】:
-
显示日期字符串。
-
没有日期字符串,没有预期的输出,没有实际的输出,毫无意义的“它不起作用”——不是一个真正的问题
标签: ios