How to convert `CreatedTime` from DataStore versioning to a Date?

I’m listing all versions of my DataStore using the DataStore | Roblox Creator Documentation sample and I’m getting this for CreatedTime:

Created: 1634997637930

I think it’s a timestamp. But converting using print(os.date("*t", 1634997637930)) I get nil.

What’s wrong?

If anyone searches on Google.

Divide the CreatedTime by 1000, as it’s milliseconds and os.date uses seconds.

1 Like