public function actionMylog() { $tasklog = new TaskLog('search'); $tasklog->unsetAttributes(); if (isset($_GET['TaskLog'])) { $tasklog->attributes = $_GET['TaskLog']; if (isset($_GET['TaskLog']['date_search']) && $_GET['TaskLog']['date_search'] != '') { $tasklog->date = date('Y-m-d', strtotime($_GET['TaskLog']['date_search'])); } } $this->render('mylog', array('tasklog' => $tasklog)); }