"crtTime":{"date":30,"day":3,"hours":15,"minutes":14,"month":3,"nanos":0,"seconds":38, "time":1209539678000,"timezoneOffset":-480,"year":108}
Date.prototype.format = function(format) { var o = { "M+" : this.getMonth()+1, //month "d+" : this.getDate(), //day "h+" : this.getHours(), //hour "m+" : this.getMinutes(), //minute "s+" : this.getSeconds(), //second "q+" : Math.floor((this.getMonth()+3)/3), //quarter "S" : this.getMilliseconds() //millisecond } if(/(y+)/.test(format)) format=format.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); for(var k in o)if(new RegExp("("+ k +")").test(format)) format = format.replace(RegExp.$1, RegExp.$1.length==1 ? o[k] : ("00"+ o[k]).substr((""+ o[k]).length)); return format; } var time = new Date(data.crtTm.time).format("yyyy-MM-dd hh:mm:ss");
long time = JSON.parseObject(str).getLong("time");的值后再做相应转换,也可使用JsonValueProcessor将date转换成希望的类型,相关文章链接:
道友请留步 2025-03-26
道友请留步 2025-03-26
藏家708 2025-03-26
leoaim 2025-03-25
恭明惠 2025-03-26
藏家468 2025-03-26
藏家101 2025-03-25
藏家101 2025-03-25
藏家101 2025-03-25
藏家068 2025-03-25