我需要转换字符串类似于“2016-07-10T21:32:20G”到日期。 但由于某种原因,我只有零一次又一次。我已阅读an article about date formater。不幸的是,并没有在那里找到答案。我在the documentation中发现了一些东西。和文档的tels阅读约Unicode Date Format Patterns。它看起来和我的相似。 也许我错过了什么=( 我的代
返回nil当我将字符串转换为NSDate,它返回nil ,并显示错误: fatal error: unexpectedly found nil while unwrapping an Optional value 例如:日期= 2016年8月9日9:45: 19 AM convertDate(DateString:String) -> NSDate{
let dateFormatter