How do i convert a unix timestamp to a date?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to make an event, but I want a text to show what time it really happens, instead of the delta from now to the date it happens

  2. What is the issue? Include screenshots / videos if possible!
    I dont know how to convert a unix timestamp (1624839851 for example) into a date (Sun Jun 27 20:23:41 2021)

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I dont know what to try and the one post titled by that didnt help
    How to convert os.time() (unix time) to an actual date?

If theres another post out there that helps with this let me know.

Use os.date().

https://developer.roblox.com/en-us/api-reference/lua-docs/os

6 Likes