Create NSDate from 24h NSString return null
问题 I have NSString in 24h format like that: NSString *a = @"10:00"; NSString *b = @"23:59"; How can I get NSDate with NSString b? I using: + setDateFormat: @"HH:mm" ==> It's work both for a and b when phone setting is 24h. + setDateFormat: @"hh:mm" ==> It's only work for a when phone setting is am/pm. My full code, with self.timeInit is NSString with 24h format: NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"HH:mm"]; NSDate *date = [dateFormat