In my application I need to get the hour and minute separately:
NSString *currentHour=[string1 substringWithRange: NSMakeRange(0,2)]; int currentHour
If you only need it for presenting as a string the following code is much easier
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"HH:mm"]; NSString *startTimeString = [formatter stringFromDate:startTimePicker.date];