Possible Duplicate:
How to assign to the nsstring object a NSString with variables?
When I try to display that nsstring object, I get this:
TOTAL OF TIME: l
Instead of that I want to get: 02:35
How to do that ? Thank you!
allTime = [NSString stringWithFormat:@"%l/%l", mins, secs];
for(Playlists *thePL in collection)
{
NSLog(@"===NEXT PLAYLIST===");
NSLog(@"Name: %@", thePL.namePL);
NSLog(@"Quantity of songs: %i", thePL.entries);
NSLog(@"Total of time: %@",thePL.allTime);
}
Assuming
minsandsecsare integers:If you want more information search the String format specifiers