how to render datetime in a particular format in extjs
I have a grid in there is field updatedon which is datetime coming from db e.g. 2011-03-22 01:45:00
here is my reader code :
{name: 'updatedon', type:'datetime'},
here is my renderer code :
{
id :'updatedon',
header : ' updatedon',
width : 100,
sortable : true,
dataIndex: 'updatedon',
renderer: Ext.util.Format.dateRenderer('d/m/Y')
},
ho开发者_JAVA百科w should i render to get 22/03/2011
done by changing the reader code
{name: 'updatedon' ,type:'date' ,dateFormat: 'Y-m-d H:i:s'},
精彩评论