NSDateFormatter producing (null) SQLite and iOS 5.1

前端 未结 2 494
说谎
说谎 2020-12-04 03:01

Maybe somebody can help explain why I am getting a null value when converting a string to a date. It all looks right but I\'m obviously missing something here.

Some

2条回答
  •  旧巷少年郎
    2020-12-04 03:45

    NSDateFormatter uses the format patterns from the Unicode Technical Standard #35.

    For the hour format, you need HH (Hour [0-23]) not hh (Hour [1-12]).

提交回复
热议问题