I want to get data of the last month, i am using the below code to do it, but it is not working correctly for me: Here is my code: public function getLastMonth($user_id) { $criteria=new CDbCriteria; $criteria->condition = 'leave_from_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH)...