title: Splitting time to 10 mins interval in iphone
body: <p>i want to split the time in the interval of 30mins, so i can get time like this:</p>
  
  <p>12:00 AM 12:10 AM 12:20 AM  .......... till 11:50 PM.</p>
  
  <p>i'm trying something like this : </p>
  
  <pre><code>NSDateFormatter *timeFormat = [[NSDateFormatter alloc] init];
  [timeFormat setDateFormat:@"hh:mm a"];
  NSDate* fromTime = [timeFormat dateFromString:startTime];
  NSDate* toTime = [timeFormat dateFromString:endTime];
  
  NSLog(@"Start time %@",fromTime);
  NSLog(@"End time %@",toTime);
  
  NSDate *dateByAddingThirtyMinute;
  
  dateByAddingThirtyMinute = [fromTime dateByAddingTimeInterval:1800];
  
  NSString *formattedDateString;
  NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 
  [dateFormatter setDateFormat:@"hh:mm a"];  
  formattedDateString = [dateFormatter stringFromDate:dateByAddingThirtyMinute];  
  
  NSLog(@"Time after 10 min %@",formattedDateString);
  </code></pre>
  
  <p>but i am able to print the first ten minute splitting ...
  can any one help me how to loop it ...</p>