NSDateFormatter dateFromString Always Returns nil

前端 未结 7 753
不知归路
不知归路 2020-12-06 10:19

I want to apologize ahead of time for asking a repeat question, but none of the other solutions have worked for me yet. Every time I try to pass a date string to the dateFro

7条回答
  •  无人及你
    2020-12-06 10:44

    Your date format doesn't match the string that you're passing, your dateString should be in this formate as per your [dateFormat setDateFormat:@"yyyy-MM-dd hh:mm:ss"];

    2013-10-09 02:40:29

    nil means dateFormat object was unable to parse your string.

提交回复
热议问题