Magento中网格列中数据库的时间戳值

zuz*_*nen 2 grid timestamp magento

我在Magento管理员中创建了一个网格,我尝试从数据库中获取一个时间戳列.

在我的网格中,我添加如下:

$this->addColumn(
    'created_at', array(
    'header' => $translateHelper->__('Created at'),
    'align' => 'left',
    'width' => '50px',
    'type' => 'datetime',
    'index' => 'created_at',
    )
);
Run Code Online (Sandbox Code Playgroud)

但在我的专栏中,我的数据如下所示:

MMMMMMMMM 28, 13 04:June:ssss PM 
Run Code Online (Sandbox Code Playgroud)

这真的很奇怪,因为我创建了上面的其他时间戳列,它们显示正常.有谁知道这是什么问题?

Ren*_*art 7

它们是时间戳的3种类型

date
datetime
time
Run Code Online (Sandbox Code Playgroud)

尝试

$this->addColumn('created_at', array(
     'header'    => Mage::helper('customer')->__('Created at'),
     'type'      => 'date',  // <-- change to date
     //'format'    => 'Y.m.d',
     'index'     => 'created_at',
));
Run Code Online (Sandbox Code Playgroud)