
An example if start date was 27/12/2013 and end date was 27/12/2016 - then my custom formula should show 3 years.
Another example is if the start date was 27/12/2013 and the end date 27/01/2017 then the result would show 3 years 1 month.
2 risposte
Try out this one (a good approximation of what you want):
CASE(FLOOR((End_Date__c - Start_Date__c) / 365),
0, '',
1, '1 year ',
TEXT(FLOOR((End_Date__c - Start_Date__c) / 365)) & ' years '
) &
TEXT(FLOOR((End_Date__c - Start_Date__c - 365 * FLOOR((End_Date__c - Start_Date__c) / 365)) / 30)) & ' months'