I have the following Javascript code:
var dateMilliseconds = web3.toAscii(newArray[i]).substring(0, 13)
console.log(dateMilliseconds) // returns 1500282374082
var date = new Date(dateMilliseconds)
console.log(date) // returns invalid date
If I try var date = new Date(1500282374082)
instead, it works - how should I be passing the dateMilliseconds
variable in properly and what type should it be?