function formatDate(strTime) {
try {
var date = new Date();
//console.log(strTime+'000');
date.setTime(parseInt(strTime + '000'));
var minutes = parseInt(date.getMinutes())>9?date.getMinutes():"0"+date.getMinutes();
return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + minutes + ":" + date.getSeconds();
} catch (e) {
return '';
}
}
转换后格式:2016-2-11 12:07:12