参考网址:http://www.magentocommerce.com/boards/viewthread/192232/#t239222
Do next:
1. Add column in your Grid.php file or rewrited file in next way
$this->addColumn('mycolumn', array(
'header' = Mage::helper('core')->__('My Column'),
'align' ='left',
'index' = 'created_at',
'type' ='action',
'renderer' = new Namespace_Module_Block_Adminhtml_Renderer_Date(),
));
2. Create class Namespace_Module_Block_Adminhtml_Renderer_Date
here is the code
<?php
class Namespace_Module_Block_Adminhtml_Renderer_Date extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
public function render(Varien_Object $row)
{
$data = MyHelperClass::calculateSpecialDate($row->getData($this->getColumn()->getIndex()));
return $data;
}
}
?>
it seems to me - that’s all