I am trying to show time on graph and i have a full time stamp in this @"2012-08-28 18:50:24" format. when i try to get time from this date then it returns nil in NSDate.
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"HH:mm:ss"];
    NSDate *time = [formatter dateFromString:@"2012-08-28 18:50:24"];
in this code only if I change   [formatter setDateFormat:@"HH:mm:ss"]; line to   [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; then it starts working with full date and time. But i need only time
 
     
     
     
     
     
     
    