Possible Duplicate:
How can I pad an integer on the left with zeros?
In my iPhone app I am calculating time in this manner.
int timeTakeInSeconds = (int)(self.timeTaken*[constants timer]);
int timeTakenMins= (int)(timeTakeInSeconds/60);
int timeTakenSecs =(int)(timeTakeInSeconds%60);
NSString *timeText = [NSString stringWithFormat:@"Time %d:%d",timeTakenMins,timeTakenSecs];
By this I am getting second as 1,2,...10, 11..and so on. But I need as 01, 02, 03...10, 11, 12..and so on..How can I do this? Is there any way to do this by number formatter? Please help.