# How to get time in milliseconds since the Unix epoch in JavaScript?

JavascriptWeb DevelopmentFront End Technology

The standard Unix epoch is an expression in seconds. The Unix epoch or Unix time is the number of seconds elapsed since January 1, 1970.

The getTime() method is used to return the millisecond representation of the Date object.

To get time in milliseconds, use the following:

var milliseconds = (new Date).getTime();
Published on 31-Jan-2018 12:31:11