1./**
* 格式化TimeStamp類型時間串
* 返回格式爲「2013-12-25 09:53:22」
*/
formatTimeStampDate = function (date) {
var datetime=new Date(date);
var year=datetime.getFullYear();
var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
var hour = datetime.getHours()< 10 ? "0" + datetime.getHours() : datetime.getHours();
var minute = datetime.getMinutes()< 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
var second = datetime.getSeconds()< 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
};javascript
2.<div class="td-div" ><script type="text/javascript">document.write(formatTimeStampDate("${ processLoggningDto.createTime}"));</script></div>java