Is it possible to convert seconds into days, hours, and minutes?

You would have to use a bit of math like getting the seconds into days with math.floor (rounds to the nearest whole number), a % for the quotient and etc, here is a script which might help

and why divide by 86400 (or 3600/60) thats because thats the amount of seconds a day/hours/minute has

local totalSeconds = 98640

local days = math.floor(totalSeconds / 86400)
local remainingSeconds = totalSeconds % 86400
local hours = math.floor(remainingSeconds / 3600)
remainingSeconds = remainingSeconds % 3600
local minutes = math.floor(remainingSeconds / 60)

print("Days:", days)
print("Hours:", hours)
print("Minutes:", minutes)

1 Like