Roblox must've changed something with os.date, because I can't get the "month/day/year" to show on a text

while wait() do

	local Data = os.date("*t")
	local Months = {"Dec", "Nov", "Oct", "Sep", "Aug", "July", "June", "May", "April", "March", "Feb", "Jan",}
	local Date = script.Parent.MM_DD_YYYY
	local Time = script.Parent.Time

	for i, v in pairs(Months) do

		if Data.month == 1 then

			Date.Text = v.."/"..Data.day.."/"..Data.year

		end

	end

	Time.Text = Data.hour..":"..Data.min..":"..Data.sec

end

image

Here is my code, and the text labels.

and here is what is now outputting in the labels:

image

“Label” would display the month but right now it’s only displaying the time (Military time) and no month/day/year

Keep in mind, I’ve used this EXACT SAME code before, it worked, but now it’s not.

Can anyone help me? and ik there is a way to make it so it reads normal time EX: 5:30 PM, then the month/day/year

1 Like

Time.Text = os.date("%b/%d/%y %H:%M:%S", os.time())

Try this out, and read through the roblox docs on other string modifiers use at the Roblox API website

1 Like

Thank you so much dude, you’re a legend!

1 Like