Convert number to formatted time?

Hello, I was wondering if there’s a function (none that i can find), that can convert a number (in seconds), to a formatted time. For example:

180 seconds would be converted to 3:00

64 seconds would be converted to 1:04.

Is there an easy way to do this? Thank you.

[lua]
local time = string.FormattedTime(secs, “%2i:%02i”)
[/lua]

where secs = your time in seconds.

Thank you sir!