<script>
function jsonDateFormat(jsonDate){
try{
var date=new Date(parseInt(jsonDate.replace("/Date(","").replace(")/",""),10));//json时间转换
var month=date.getMonth()+1<10?"0"+(date.getMonth()+1):date.getMonth()+1;//月份
var day=date.getDate()<10?"0"+date.getDate():date.getDate();//天数
var hours=date.getHours();//时
var minutes=date.getMinutes();//分
var seconds=date.getSeconds();//秒
var milliseconds=date.getMilliseconds();//毫秒
return date.getFullYear()+"-"+month+"-"+day+""+hours+":"+minutes+":"+seconds;//返回时间
}
catch(ex){
return "对不起系统出错了!!!";//错误返回
}
}
</script>
function jsonDateFormat(jsonDate){
try{
var date=new Date(parseInt(jsonDate.replace("/Date(","").replace(")/",""),10));//json时间转换
var month=date.getMonth()+1<10?"0"+(date.getMonth()+1):date.getMonth()+1;//月份
var day=date.getDate()<10?"0"+date.getDate():date.getDate();//天数
var hours=date.getHours();//时
var minutes=date.getMinutes();//分
var seconds=date.getSeconds();//秒
var milliseconds=date.getMilliseconds();//毫秒
return date.getFullYear()+"-"+month+"-"+day+""+hours+":"+minutes+":"+seconds;//返回时间
}
catch(ex){
return "对不起系统出错了!!!";//错误返回
}
}
</script>