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
ChrisMcLChrisMcL 

Add months to date?

I know it is possible to add the number of days to a date field by:
 
Code:
MUSW__Issued_Date__c + 182

 
but it is possible to add the number of months to date? If so, how?
 
Thanks,
James Wikkerink
Municipal Software
lagelage
I'm guessing you want it like ex. 6 months added from June 12 = December 12, not just adding 30*6, right?

- Tanner Shamrock
ChrisMcLChrisMcL

Yes that is correct.

Jun 6 + 3 months = Sep 6

Jeff TalbotJeff Talbot
Just played around with this a bit.... something like this could work, although it still needs some tweaking to be exact for leap years. Hope this gets you started. Good luck.
 
LastActivityDate+CASE(MONTH( LastActivityDate),1,181,2,181,3,184,4,183,5,184,6,183,7,184,8,184,9,181,10,182,11,181,12,182,0)