I have an date field that need to be presented as day/month/year and saved as year-month-date. I thought in using CFilter for that but since it apply a function after the action it would be executed before the renderization.
Should i put it on an event, is there a default approach for filtering input data and formating the output data in yii?
The easiest way to do it is to pass your information to a CGridView / CDetailView as a type of date:
Passing in a type then formats it with the corresponding formatDate function CFormatter. It's incredibly handy / flexible. That way you don't even have to convert your dates to a different format. More info here: https://github.com/samdark/a-guide-to-yii-grids-lists-and-data-providers/blob/master/grid-columns.md