Capturing age of an opportunity when its closed won

I'm trying to calculate the age of an opportunity when the opportunity stage becomes “Closed Won”.  I used the steps as described in SugarCRM knowledge base - "Capturing the Age of Closed Won Opportunities”  yet it's not working properly. After saving the record the attached error message occurs.

I've only slightly adapted the formula to the fields we're using. 

Knowledge base:

ifElse(and(equal($sales_stage,"Closed Won"),equal($closed_won_cbk_c,false)),today(),date(""))

 

Ours: 

ifElse(and(equal($icc_probability,"closed"),equal($closed_won_cbk_c,false)),today(),date(""))

I can't figure out why the error occurs as I followed all the steps in the instruction. Is there a bug related to this?

Thanks in advance.