Why I am getting Invalid date in the following case:
function formatUnixDateString(value_) {
//https://stackoverflow.com/questions/20943089/how-to-convert-unix-timestamp-to-calendar-date-moment-js
if(moment(value_).isValid()){
//return moment.unix(value_).format('MM/DD/YYYY');
return moment(value_).format('L');
}
else {
return "";
}
}
Trying this line return moment(value_).format('L');
and it keeps on printing Invalid date
My dates are in this format 1522144800000