How to Convert Days into Formatted Time?

How do put Days into Formatted Time?
For Example
4095 Days Turns Into 11 Years, 2 Months, and 19 Days.

local rp = game.ReplicatedStorage
local bill = Instance.new("BillboardGui")
bill.Parent = rp
local tl = Instance.new("TextLabel")
bill.Active = true
bill.AlwaysOnTop = true
tl.Parent = bill
tl.Active = true
bill.ExtentsOffset = Vector3.new(0, 2, 0)
tl.BackgroundTransparency = 1
tl.TextSize = 34
tl.TextScaled = true
tl.TextColor3 = Color3.new(0, 255, 0)
tl.Font = "SourceSansLight"
bill.Size = UDim2.new(0, 200, 0, 50)
bill.LightInfluence = 1
tl.Size = UDim2.new(0, 200, 0, 50)

game.Players.PlayerAdded:connect(function(plr)
	plr.CharacterAdded:connect(function(char)
		local AA = plr.AccountAge
		
		local clonedb = bill:Clone()
		
		clonedb.TextLabel.Text = "Age: " .. AA .. " Days"
		
		clonedb.Parent = char:WaitForChild("Head")
	end)
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Nice answer

I would just do years + days though, since the months only means anything if you take into account the exact start date

1 Like