How to make a text display your time

Hi, so im making a text label say the players current time, and I’ve got the part where I get the time, but I don’t know how to format it. Someone please help!

local now =
local minutesnow = now:ToLocalTime().Minute

this prints

never used DateTime but this should work:

local TimeNow =
local LocalTime = TimeNow:ToLocalTime()
print("Current Time: "..LocalTime.Hour..":"..LocalTime.Minute..":"..LocalTime.Second)
1 Like

Thank you, but do you know how to convert it to standard display??

For example, if the time right now is 2 pm, the thing shows 14pm. How do I fix this?

print("LTS", "en-us"))

First argument for FormatLocalTime is the format, and the second is the locale.
You can find a list of these in this article

1 Like