//功能:laydate控件后台返回的时间前台格式化
//参数:laydate控件值
function formatDate(strTime) {
if ("" === strTime) return "";
var dateStr=strTime.trim().split(" ");
var strGMT = dateStr[0]+" "+dateStr[1]+" "+dateStr[2]+" "+dateStr[5]+" "+dateStr[3]+" GMT+0800";
var date = new Date(strGMT);
var month = date.getMonth()+1;
if(month<10){
month="0"+month;
}
var day = date.getDate();
if(day<10){
day="0"+day;
}
var hour = date.getHours();
if(hour<10){
hour = "0"+hour;
}
var minute = date.getMinutes();
if(minute<10){
minute = "0"+minute;
}
var second = date.getSeconds();
if(second<10){
second = "0"+second;
}
return date.getFullYear()+"-"+month+"-"+day+" "+hour+":"+minute+":"+second;
}