I have this code in my cakephp project:
$this->data[\'MyObject\'][\'expire_date\'] = \'NOW()\';
and...
$this->MyObject-&g
You can shorten that to
$this->data['MyObject']['expire_date'] = date('Y-m-d H:i:s');
By default, date() will take the present time, if you do not pass it a second 'timestamp' argument.
This method is preferable to calling DboSource::expression()
especially when you want to set it in the controller for various reasons, instead of in the model.