[javascript] JSON datetime string to javascript date format yyyy-MM-dd hh:mm:ss
HTML js function formatDate(date) { var d = new Date(date), month = '' + (d.getMonth() + 1), day = '' + d.getDate(), year = d.getFullYear(), hour = d.getHours(), min = d.getMinutes(), sec = d.getSeconds(); if (month.length < 2) month = '0' + month; if (day.length < 2) day = '0' + day; return [year, month, day].join('-') + ' ' + [hour,min,sec].join(':'); } var dateText = "/Date(1519794794410)/"; ..