Postgresql 9.2 To_Char Function Eror Response Invalid Field

Hey together,

II working a few week with yii an now I have a problem where I can’t find a solution.

my Code for defaultScope




   'select'=>"* ,extract ('epoch' from sperrdauer) as intervall "



the obove code works well.




   'select'=>"* ,to_char(sperrzeitpunkt,'DD MON YYYY HH24:MI')as zeitpunkt ",



the above code throws an error

invalid field "to_char(sperrzeitpunkt" …

yii version 1.1.13

postgresql version 9.2.4

Any suggestions what I can do

many thanks

Peter

further tests showed the Problem doesn’t exist in rendering a view. It seems it only exists when ist is used for CGridView Widget.