$models = Category::model()->findAll(array('order' => 'date')); $list = CHtml::listData($models, 'name', 'date');
The thing is the date column is not yet formatted. I want to format it but dont know to do stuff with the listData(). It should be something like: $list = CHtml::listData($models, 'name', myformat($model->date));. I tried to format it and put it into an array but could not add it in the CHtml::listData. Please help .