Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

string date to date in javascript

var ts = '1471793029764';
ts = Number(ts); // cast it to a Number
var date = new Date(ts); // works

var invalidDate = new Date('1471793029764'); // does not work. Invalid Date
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #string #date #date #javascript
ADD COMMENT
Topic
Name
2+7 =