Skip to content

Instantly share code, notes, and snippets.

@Infinitusvoid
Last active February 15, 2023 09:42
Show Gist options
  • Save Infinitusvoid/771c997e57a70758aa9017a8467c024f to your computer and use it in GitHub Desktop.
Save Infinitusvoid/771c997e57a70758aa9017a8467c024f to your computer and use it in GitHub Desktop.
Javascript : How to transform epoch time into date?
//To convert this timestamp to a human-readable date and time, you can use JavaScript's Date object. Here's an example:
//The output of this code will be a string representation of the date and time in the local time zone of the computer running the code.
const timestamp = 1676456193458;
const date = new Date(timestamp);
console.log(date);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment