I have the following code in Javascript:
//obj.uploadDate = 1466679630387
temp = new Date(obj.uploadDate);
uploadDate = temp.toString('yyyy-MM-dd HH:mm:ss');
For some reason, the value of uploadDate
is NaN-NaN-NaN NaN:NaN:NaN
, instead of a formatted date.
What could be the issue?