I am Created one Custom Module called : Sigmasolve/Recipe.
But Problem is that on Grid Page only Display Updated Time Column But not Display any Data in That Column. And also in Database only create column like updated_time but not store any "data" in that Field.
I am Using Magento Version:1.9.2.3 .
Any Kind of help will appreciated.
2 Answers 2
To save updated_time from your controller use this-
if you want to save current time
$yourModelCollection->setUpdatedTime(Varien_Date::now())->save();
Or if you want to save any particular date then
$yourModelCollection->setUpdatedTime('your_date')->save();
Add following function in your Sigmasolve/Recipe model file.
public function beforeSave()
{
 parent::beforeSave();
 $this->setUpdatedTime(Mage::getModel('core/date')->date('Y-m-d h:m:s'));
 return $this;
}
update_timecolumn is empty than you may not have set the value for that while saving data from your controller