时间
将long值时间转为(yyyy-MM-dd HH:mm:ss)
function datetimeFormat(longTypeDate){ if(longTypeDate==null)return ""; var dateTypeDate = ""; var date = new Date();date.setTime(longTypeDate);dateTypeDate += date.getFullYear();dateTypeDate += "-" + tow(date.getMonth()+1);dateTypeDate += "-" + tow(date.getDate());dateTypeDate += " " + tow(date.getHours());dateTypeDate += ":" + tow(date.getMinutes()); dateTypeDate += ":" + tow(date.getSeconds());return dateTypeDate; }
function tow(i){return i<10?"0"+i:i+"";}
将格林威治时间(Sun May 10 00:00:00 CST 2020)值转为(yyyy-MM-dd )