问题
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