ExtJS DateFormat Issue

混江龙づ霸主 提交于 2020-01-14 10:46:31

问题


I haven't found an existing question on this exact problem (there were several that were similar but did not help).

I have a GridPanel with exam results, including when the exam was complete. The date returned from the SQL server is formatted like 'yyyy-mm-dd hh:mm:ss.uuu' (2011-04-15 19:45:13.197).

My problem is that even though the time is 19:45, it always displays as 7:45 AM.

The dateformatter I am using in the datastore is 'Y-m-d H:i:s' and 'F j, Y, g:i A' in the column model. I have tried several different options in the datastore and none of them make a difference, if they even work at all.

Thanks


回答1:


You can try the following: In the Store use type:'date', dateFormat: 'c' in the column use xtype: 'datecolumn', format: 'Y-m-d H:i:s' that work for me.



来源:https://stackoverflow.com/questions/5985051/extjs-dateformat-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!