//年月日 function ChangeDateFormat(cellval) { var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); return date.getFullYear() + "-" + month + "-" + currentDate; } //时分秒 function ChangeDateFormat1(cellval) { var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); var hours = date.getDate() < 10 ? "0" + date.getHours() : date.getHours(); var inutes = date.getDate() < 10 ? "0" + date.getMinutes() : date.getMinutes(); var seconds = date.getDate() < 10 ? "0" + date.getSeconds() : date.getSeconds(); return hours + ":" + inutes + ":" + seconds; }