omGrid,返回页面时间,一长串数字解决办法
来源:互联网 发布:数据库 文件系统 区别 编辑:程序博客网 时间:2024/06/05 00:12
数据库存储时间2012-9-4 9:57:10,正常
po对象
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "LAST_UPDATE_DATE", nullable = false, length = 7)
public Date getLastUpdateDate() {
return this.lastUpdateDate;
}
页面JS$('#grid').omGrid,部分代码
colModel : [ {header : '序号', name : 'uomClassId', width : 50, align : 'center',sort:'clientSide'},
{header : '物料单位分组名称', name : 'uomClass', width : 100, align : 'left',sort:'clientSide'},
{header : '创建时间', name : 'creationDate', width : 150, align : 'left',sort:'clientSide',
renderer : function(colValue, rowData, rowIndex) {
if(colValue != ""){
colValue = getFormatDate(colValue,'yyyy-MM-dd hh:mm:ss');// getFormatDate依赖于tb-function.js
}
return colValue;
}//end renderer
},
{header : '创建者', name : 'createdBy', width : 'autoExpand', align : 'left',sort:'clientSide'}
]
页面JS里定义函数
//将返回页面的时间格式化
function getFormatDate(date, dateformat) {
date = new Date(date);
var format = dateformat||'yyyy-MM-dd hh:mm:ss';
var o = {
"M+" : date.getMonth() + 1,
"d+" : date.getDate(),
"h+" : date.getHours(),
"m+" : date.getMinutes(),
"s+" : date.getSeconds(),
"q+" : Math.floor((date.getMonth() + 3) / 3),
"S" : date.getMilliseconds()
};
if (/(y+)/.test(format)) {
format = format.replace(RegExp.$1,
(date.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;
};
- omGrid,返回页面时间,一长串数字解决办法
- 如何把一长串数字分位显示?
- HQL查询的LIST<object> 返回omgrid显示
- 页面返回被清空的解决办法
- javaScript计算后出现一长串数字的现象:如何解决
- 解决html 展示一长串数字不能自动换行
- fastjson把Date类型数据转换成一长串数字
- 后台时间返回前台变一串数字
- js时间显示器及页面返回程序
- jsp页面格式化数字或时间
- jsp页面格式化数字或时间
- jsp页面格式化数字或时间
- jsp页面格式化数字或时间
- jsp页面格式化时间或数字
- jsp页面格式化数字或时间
- jsp页面格式化数字或时间
- jsp页面格式化数字或时间
- jsp页面格式化数字或时间
- JAVA设计模式——单例(Singleton)模式 多种实现方法
- Handler线程操作
- configure的交叉编译问题
- ASP脚本限制某IP段对网页的访问
- oracle 查询 两个字段,第一个和第二个字段不为空时,就用第二个字段的值, 否则用第一个字段的
- omGrid,返回页面时间,一长串数字解决办法
- [Ext.Net] 1.2.0/Ext JS_用 Ext JS 增删改 Ext.Net.Store
- HDU2955 Robberies
- minimalcomps barchart/linechart
- HOW TESLA K20 SPEEDS QUICKSORT, A FAMILIAR COMP-SCI CODE By Stephen Jones on Sep 12 2012 In Superco
- weblogic.xml 部署描述符元素
- HTTP请求响应方式总结
- 最长回文子串
- 餐桌上的“爱心菜”