function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ramu SfdcRamu Sfdc 

Hi all, I just want create formula field like  Postal year= todays year -2012 I tried but I am facing errot (Today().Year()-2012) please help me out Thanks in advance Regards, Ramu.

Hi all,
I just want create formula field like 

Postal year= todays year -2012

I tried but I am facing errot
(Today().Year()-2012)

please help meout

Thanks in advance


Regards,
Ramu.
AbhinavAbhinav (Salesforce Developers) 
Hi Ramu,

from this  Today().Year()-2012  is it you want output as 9 or something  else?

Try this Year(TODAY())-2012
 
Ramu SfdcRamu Sfdc
Hi Aninav 

Thanks for the replay, Yeah we shoud display out put is 9
Ramu SfdcRamu Sfdc
I tried    (TODAY())-2012  this if i keep output data type is date it wsa showing 1/2/2016 and if i keep data type is number it was throwing a error ""
 Error: Formula result is data type (Date), incompatible with expected data type (Number).""