Created
September 3, 2019 22:07
-
-
Save masautt/c95a8d98fadc2878a3fdcbdfb2c99e30 to your computer and use it in GitHub Desktop.
How do you get a timestamp in JavaScript?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get the EPOCH Time | |
console.log(Date.now()) //--> 1567548304725 | |
//Get a string date | |
console.log((new Date).toLocaleString()); //--> 9/3/2019, 3:07:03 PM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment