how to get milliseconds since epoch javascript code example
Example 1: get epoch timestamp js
Math.floor(Date.now() / 1000)
Example 2: convert date and time into epoch javascript
var someDate = new Date(dateString);
someDate = someDate.getTime();