I tried to look for all possible answers but could not find how to add two times in "HH:mm:ss" format.
I have couple of captured times in an array and I want to return sum of all in HH:mm:ss format as Here is my code:
-(void) addTime
{
NSMutableArray *recordedArray = [[NSMutableArray alloc] initWithObjects:@"00:45:12",@"20:08:15",@"00:09:36",@"00:50:20", nil];
double sumOne = 0;
for (NSNumber * n in recordedArray)
{
sumOne += [n doubleValue];
}
NSLog(@"Sum of array time in HH:mm:ss is--> %f", sumOne);
}
Anonymous User
28-Oct-2014