Date Format

My database stores, DateTime value , how can I display only year?


<?php echo Yii::app()->format->date(strtoTime((CHtml::encode($data->date)))); ?>

Is there something like strtoYear?




<?php echo date('Y', strtotime($data->date)); ?>



Thanks!!!