日期:2014-05-17  浏览次数:20611 次

前台jsp页面遍历数据库记录报日期格式错误问题
前台用的是EXT框架做的,以下是前台遍历页面的代码
var extGrid_FTGYSdata_list_cfg = {
 dataSource : 'FTGYSdata_list',
 fields : [
   {name:'ID',type:'string',header:'ID'},
   {name:'GYSNO',type:'string',header:'供应商编号'},
   {name:'GYSNAME',type:'string',header:'供应商名称'},
   {name:'CCNO',type:'string',header:'证书编号'},
   {name:'CCNAME',type:'string',header:'证书名称'},
   {name:'VAIDITY',type:'date',dateFormat:'Y-n-j G:i:s',header:'证书有效期'},
   {name:'attachment',type:'string',header:'附件'},
   {name:'CREATEDATE',type:'date',dateFormat:'Y-n-j G:i:s',header:'创建日期'}
],
 columns : [
   {header:' ',dataIndex:'',icon:'edit',sortable:true,resizable:false,title:'编辑',width:30,link:'/FTGYSdata.do?method=detail&ID={ID}&_path=/CommitFT/FTBasicInfo/FTGYS/FTGYSdata_Add.jsp',renderer:Ext.Cmt.defaultGridCellLinkRender},
   {header:'供应商编号',dataIndex:'GYSNO',sortable:true,width:100},
   {header:'供应商名称',dataIndex:'GYSNAME',sortable:true,width:200},
   {header:'证书编号',dataIndex:'CCNO',sortable:true,width:100},
   {header:'证书名称',dataIndex:'CCNAME',sortable:true,width:200},
   {header:'证书有效期',dataIndex:'VAIDITY',sortable:true,width:150,renderer:Ext.util.Format.dateRenderer("Y-m-d")},
   {header:'创建日期',dataIndex:'CREATEDATE',sortable:true,width:150,renderer:Ext.util.Format.dateRenderer("Y-m-d")}
],


下面是报错的代码,没法上图,只能复制黏贴了:
java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]

------解决方案--------------------
就是你后台哪里用到了VAIDITY和CREATEDATE了