Why ExtJS grid doesn't show the date field value?
I select it from MySQL database and FireBug shows that script receives it, but I see the empty date column in the grid.
ExtJS grid doesn't show the date field value
(2 posts) (2 voices)-
Posted 1 year ago #
-
One of the reason can be the different Date and Time format which you use in MySQL select expression and ExtJS script.
For example MySQL returns datetime field value as 'YYYY-mm-dd hh:mm:ss' by default.
If you haveformat: 'm-d-Y H:i:s'
in your datetime grid column definition, you will see the blanks instead of real date and time values.
So to resolve this problem you can use the same datetime format at your MySQL select expression, e.g.SELECT DATE_FORMAT(datetimefield, '%m-%d-%Y %H:%i:%s') AS datetimefield FROM sometable
Posted 1 year ago #
Reply
You must log in to post.