This article describes how to use the timestamp in JavaScript to date format, there is a good example, interested friends can refer to the following
The public processing timestamp function code is as follows:/** * processing timestamp converted to date format * @param {Object} obj timestamp {10-bit timestamp needs to be multiplied by 1000; 13-bit timestamp does not require} * @return {TypeName} return date format 2 013-09-16 */function Fullnum (obj) {if (number (obj) <) {return ' 0 ' + obj; }else{return obj; } 1. The timestamp stored in PHP is 10 bits, and when JavaScript is processed it needs to be multiplied by 1000 to get the time code for the date format as follows: var mystime = newdate (MSG.PAGER.RESULT[I].ADSDA TE * 1000); var addstime = mystime.getfullyear () + '-' + fullnum (number (Mystime.getmonth ()) + 1) + '-' + fullnum (mystime.getdate ()); Addstime shows the time is 2013-09-16 2. The timestamp stored in Java is 13 bits, so the time code for the date format is as follows in JavaScript processing without any processing: var mystime = newdate (msg . pager.result[i].adsdate); var addstime = mystime.getfullyear () + '-' + fullnum (number (Mystime.getmonth ()) + 1) + '-' + fullnum (mystime.getdate ()); Direct use of addstime can be 2013-09-16