In my grid data store, I have a date field which contains data ing 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?
In my grid data store, I have a date field which contains data ing 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?
Share Improve this question asked Sep 1, 2011 at 10:25 pm13pm13 7457 gold badges23 silver badges37 bronze badges1 Answer
Reset to default 6Field 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
).