views:

276

answers:

1

Hi all, Is there any way how can i convert a nstimeinterval type value to a string type in xcode?

Thanks in advance Joy

+6  A: 

An NSTimeInterval is a double. You could use

return [NSString stringWithFormat:@"%g", timeInterval];

for more sophisticated format (e.g. "2 minutes 40 seconds"), write your own function.

KennyTM