4

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

cmhampton
  • 193
  • 5
  • 12

1 Answers1

2

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.

sra
  • 23,820
  • 7
  • 55
  • 89
  • Sorry, it still says 7:45 AM. – cmhampton May 12 '11 at 22:38
  • @cmhampton please confirm that your date format in the store is something like this: `Date {Mon May 09 2011 15:09:00 GMT+0000}` and provide some example code about how you trying to display it. – sra May 13 '11 at 09:16
  • Well, I feel like an idiot. There was a typo in my server side JSON encoding function. Once I fixed it, everything works perfectly. Sorry to waste your time sra. – cmhampton May 13 '11 at 15:11
  • @cmhampton No problem! Everytime again – sra May 13 '11 at 18:13