Convert from human-readable date to epoch

I was looking for converting a human readable date (e.g. 24 NOV 7:27pm 2022) into a Unix Timestamp / Epoch value.

I have looked this up for Roblox/Lua and found a very handy website called Epoch Converter but Lua is missing from the list of languages on how to convert a human-readable date to epoch.

os.time() returns a unix aka epoch

But how do i use os.time with a custom date?

what do you mean by saying custom date

Using a custom date and converting it into a Unix timestamp, for example:
image

You were correct! I did some more digging into the os.time() function and you can parse a table through it with the date and time info and it will return with the unix timestamp! Funny how it didnt mention it on the website though.

1 Like

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