function formatDate(now) {
var year = now.getFullYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var hour = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
//2015-09-16T00:00:00
}
//alert();
//获取当前日期
function show() {
var mydate = new Date();
var str = "" + mydate.getFullYear() + "-";
str += (mydate.getMonth() + 1) + "-";
str += mydate.getDate();
return str;
}
var nowDate1 = show();
var nowDate = new Date(nowDate1);
function FormatDate(strTime) {
var date = new Date(strTime);
return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
}