In my grid data store, I have a date field which contains data coming in from the database as 20/12/2010 13:01:53.180.
No matter what type of formatting I try, it either does not display or outputs similar to
Thu 26 May 2011 00:00:00 GMT+0100 (GMT Daylight Time).
What I ultimately what is output similar to 26 May 2011.
I have tried the following
Field: [{
{name:'viewedDt', type: 'date', dateFormat: 'd-F-Y'}}
Columns: [{
,{xtype: 'datecolumn', id:'lastViewedDate', header: "Last Viewed Date", width: 130, sortable: true, format: 'Y-m-d H:i:s', dataIndex: 'viewedDt', align: 'center'} },
,{id:'lastViewedDate', header: "Last Viewed Date", width: 130, sortable: true, renderer: Ext.util.Format.dateRenderer('d/F/Y'), dataIndex: 'viewedDt', align: 'center'}
Any tips on how to resolve this?
Field should have a format string matching the format in which date is received from database (
20/12/2010 13:01:53.180->d/m/Y H:i:s.u) Column on the other hand should have format according to how you want to display the date (26 May 2011->d F Y).