Just in case it´s helpful for anyone, the attached is the code tha works for 3 different calculated fields, it need to be entered just in the "add template" and the other two template "single template" and "list template" would also work without need to enter the code there...
General developer forum
Database activity- Calculated field
This discussion has been locked so you can no longer reply to it.