Skip to main content Stream TDX Bengaluru on Salesforce+. Start learning the critical skills you need to build and deploy trusted autonomous agents with Agentforce. Register for free.

Hello!

 

I need to create a formula field that will show a date based on the number of months is the future.  So, if the date is October 15, 2023 and the month number is 2*, the date will calculate to December 15, 2023.  As a bonus, could I make the date value December 2023 - the day is immaterial.

 

*For clarity, this number represents the number of months in a contract term.  This number will come from a field value.

 

Thank you!

 

BB

5 answers
  1. Dec 5, 2023, 9:39 PM

    Hi ,

     

    Try this

     

    CASE(MONTH(ADDMONTHS( Ending_Date__c , Month_number__c )),

    1,"January",

    2,"February",

    3,"March",

    4,"April",

    5,"May",

    6,"June",

    7,"July",

    8,"August",

    9,"September",

    10,"October",

    11,"November",

    "December") + " " +

    TEXT(YEAR((ADDMONTHS( Ending_Date__c , Month_number__c ))))

Loading
0/9000