protected function afterValidate() { //convert to storage format if ($this->hasErrors()) { $this->end_date = Yii::app()->dateFormatter->format('dd/MM/yyyy HH:mm', $this->end_date_timestamp); $this->start_date = Yii::app()->dateFormatter->format('dd/MM/yyyy HH:mm', $this->start_date_timestamp); } return parent::afterValidate(); }