I've been racking my brain for about 8 hours trying to figure out how this formula works, or I guess WHY it works.
DATE( Year( Contract_Start_Date__c )+floor((MONTH(Contract_Start_Date__c) + Contract_Term__c -1) / 12) , mod(MONTH(Contract_Start_Date__c) + Contract_Term__c -1, 12) + 1 , day(Contract_Start_Date__c)) - 1
I understand that it's taking into account 'contract start date' and 'contract terms' to get contract end date. I'm just unsure why
MOD are being used. I broke the formula down into a google sheet and was able to figure out that the 'month' argument will produce a year with a decimal place, so using
FLOOR to solve to that.
Can anyone break this down further for me?