In objective-c, how can I convert an integer (representing seconds) to days, minutes, an hours?
Thanks!
try this,
int forHours = seconds / 3600, remainder = seconds % 3600, forMinutes = remainder / 60, forSeconds = remainder % 60;
and you can use it to get more details as days, weeks, months, and years by following the same procedure