How to convert os.time() -> month, day, year?

Basically, TL;DR, i am trying to display when the user created their save file, here is an example of what it will show however im unsure on how to convert os.time() into this format:

image

you can pass string formats in the os.time()

local formattedTime = os.date("%Y-%m-%d %H:%M:%S")
print("Save file created on: " .. formattedTime)

Y year M month D day H Hour M Minute S second

Thanks for letting me know.
May i also ask how would i convert the month like this (08 > August, 03 > March) or would it have to be a manual conversion?

this will help a lot

1 Like

Thank you so much, exactly what i needed.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.