Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert date to millisecond in javascript

var date = new Date("11/21/1987 16:00:00"); // some mock date
var milliseconds = date.getTime(); 
// This will return you the number of milliseconds
// elapsed from January 1, 1970 
// if your date is less than that date, the value will be negative

console.log(milliseconds);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #date #millisecond #javascript
ADD COMMENT
Topic
Name
3+5 =