How can I convert seconds into minutes and seconds?
I am aware that you can convert seconds to minutes like so, but I don't know how I can get the remainder of seconds...
int minutes = seconds / 60;
How can I convert seconds into minutes and seconds?
I am aware that you can convert seconds to minutes like so, but I don't know how I can get the remainder of seconds...
int minutes = seconds / 60;
Swift
You will obtain minutes with :
and remaining seconds with:
Here's a better answer from Convert Seconds Integer To HH:MM, iPhone
Swift version: