Hi guys! I have a time value in the format of 00:00:00000 I am trying to condense this down to 00:00:000 (Minutes, seconds and then milliseconds etc. up to 3 after the decimal place)
Any ideas why this is not working to do that? :(
function DigitalTime(TimeNum)
local Time = math.max(0, TimeNum)
local minutes = math.floor(Time / 60) % 60
local seconds = math.floor(Time) % 60
local m = tostring(math.floor((TimeNum%60)*100000))
local Timestring = string.format("d:d", minutes, seconds, m)
return Timestring
end
lol = 62.3034
A = DigitalTime(lol)
print(A)
It prints 1:02 Any help would be appreciated :) Thanks!

2 comments
Your over complicating things for the Timestring, string.format(minutes..":"..seconds..":"..m). As for the rounding to the third decimal place, I'm not quite sure.
This website cannot display these format strings. This website is broken.