For this particular case (with tim
formatted the way you have it) you just missing one line: [formatter setDateStyle:NSDateFormatterNoStyle];
this will tell formatter
not to look for date
in your string.
NSString* tim = @"11:12 AM";
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setTimeStyle:NSDateFormatterShortStyle];
[formatter setDateStyle:NSDateFormatterNoStyle];
NSDate *formatedTime= [formatter dateFromString:tim];
NSLog(@"TIME : %@",formatedTime);