How do you get a timestamp in JavaScript?

Posted by Editorial Staff | Updated on

Are you searching for how do you get a timestamp in JavaScript? Use the following JavaScript code get a timestamp. On almost all current browsers you can use to get the UTC timestamp in milliseconds; a notable exception to this is IE8 and earlier.

Timestamp in Milliseconds

To get the timestamp in seconds, you can use:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers