Im trying to make a table with vue.js and one of the row is supposed to print a date i receive in epoch time. but fail to convert it in a readable date and just get "invalide date" printed on my browser.
Here is how i convert it
var sec = 1588351494;
var tmp =new Date(0);
tmp.setUTCDate(sec);
var res= tmp;
her is how it's made to be able to be called as a vue.js object
return {
tableData: [
{
uid: '01020304050607',
lastReadDate: res,
},
]
}
And then i simply print it in my html page doing this, which print the "invalide date" in the row.
<td>
{{row.lastReadDate }}
</td>