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
mikeolmikeol 

Formula field / Date calcuations

I'd like a formula that takes a supplied date and returns a date which will be exactly 3 years - 1 day into the future, i.e. last day of a 3 year agreement.  For example 1 Jan 2007 > 31 Dec 2010.  In Excel I can have date made of component day or month values of 0 or less but still get a valid date, i.e. DATE(2007+3,1,1-1) which is DATE(2010,1,0) and equals 31/12/2009.

Thanks for your help.
MattWordenMattWorden

Try this ...

 

DATE(YEAR(given_date-1)+3,MONTH(given_date-1),DAY(given_date-1))

 

... where "given_date" is replaced by your date field's API name.

 

Hope that's helpful. :)

 

-Matt

mikeolmikeol
Many thanks.

It's a beauty.