08-25-2009, 11:08 AM
|
#4 (permalink)
|
|
Registered Member
Join Date: Aug 2009
Age: 20
Posts: 197
|
Quote:
Originally Posted by deansx
I have some code that displays minutes:seconds:tenths. I want the minutes and seconds to be two digits, even if there are less than 10 of either. The formatting that works for me is:
Code:
[self setText:[NSString stringWithFormat:@"%02d:%02d.%1d",dispMins,dispSecs,tsecs]];
Will give output, of:
for 2 minutes, 8 and 3 tenths seconds.
Good luck!
|
Thanks for the help!
|
|
|