Search By Month In Yii Search

Hi all,

I want to search a model attribute of type date only by month,ie

$criteria->compare(‘end_date’,$this->end_date,false); here $this->end_date is a form field which gives only the month.

If the $this->end_date is 02 then $criteria->compare(‘end_date’,$this->end_date,false); will return 2013-12-23 also…whats the problem in the code…!!