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
Mahboob AljiwalaMahboob Aljiwala 

Whats wrong in this formula ?

IF(

NOT(ISNULL( Experience1__c )),

TEXT((FLOOR((End_Date__c -Start_Date1__c)/365)) + 
    (FLOOR((End_Date1__c -Start_Date2__c)/365))) & " Years " &

TEXT((FLOOR(MOD((End_Date__c -Start_Date1__c),365)/30)) + 
    (FLOOR(MOD((End_Date1__c -Start_Date2__c),365)/30))) & " Months " & 

TEXT(FLOOR(MOD(FLOOR(MOD((Floor(MOD(Floor(MOD((End_Date__c -Start_Date1__c),365)),30))) + 
                         (Floor(MOD(Floor(MOD((End_Date1__c -Start_Date2__c),365)),30))),365)),30))) & " Days ",


 Experience__c )

To Calculate total experience from 2 experience fields with return type text.
Raj VakatiRaj Vakati
try this 
 
IF(

NOT(ISNULL( Experience1__c )),

TEXT((FLOOR((End_Date__c -Start_Date1__c)/365)) + 
    (FLOOR((End_Date1__c -Start_Date2__c)/365))) & " Years " &

TEXT((FLOOR(MOD((End_Date__c -Start_Date1__c),365)/30)) + 
    (FLOOR(MOD((End_Date1__c -Start_Date2__c),365)/30))) & " Months " & 

TEXT(FLOOR(MOD(FLOOR(MOD((Floor(MOD(Floor(MOD((End_Date__c -Start_Date1__c),365)),30))) + 
                         (Floor(MOD(Floor(MOD((End_Date1__c -Start_Date2__c),365)),30))),365)),30))) & " Days ",


 "" )

 
Mahboob AljiwalaMahboob Aljiwala
Thanks for your reply My formula is giving compiled size error.But now i have found the solution of my error. Thanks. Regards
Mahboob AljiwalaMahboob Aljiwala
IF(NOT(ISBLANK(Experience1__c)), 

TEXT(FLOOR(((End_Date__c -Start_Date1__c)+(End_Date1__c -Start_Date2__c))/365)) &' Years' & ' ' & 

TEXT(FLOOR(MOD((End_Date__c -Start_Date1__c)+(End_Date1__c -Start_Date2__c),365)/30)) &' Months' & ' ' & 

TEXT(MOD(MOD((End_Date__c -Start_Date1__c)+(End_Date1__c -Start_Date2__c),365),30)) &' Days', 

Experience__c 
)


Above formula is running perfect as per my requirement.
Thanks.
Jega DeivaJega Deiva
Hi

Your experience field should be a text field,Try this code below
         
       

IF(

NOT(ISBLANK( Experience1__c )),

TEXT((FLOOR((End_Date__c -Start_Date1__c)/365)) + 
    (FLOOR((End_Date1__c -Start_Date2__c)/365))) & " Years " &

TEXT((FLOOR(MOD((End_Date__c -Start_Date1__c),365)/30)) + 
    (FLOOR(MOD((End_Date1__c -Start_Date2__c),365)/30))) & " Months " & 

TEXT(FLOOR(MOD(FLOOR(MOD((Floor(MOD(Floor(MOD((End_Date__c -Start_Date1__c),365)),30))) + 
                         (Floor(MOD(Floor(MOD((End_Date1__c -Start_Date2__c),365)),30))),365)),30))) & " Days ",


 Experience__c )
 
  
    Thanks
    Jega
    Sweet PotatoTec
 
Mahboob AljiwalaMahboob Aljiwala
Hi Jega,

User-added image

Getting this type of error.
Jega DeivaJega Deiva
Hi  
       
 Try this

IF(NOT(ISBLANK(Experience1__c)), 

TEXT(FLOOR((( Meeting_end_date__c - Meeting_start_date__c )+( Meeting_end_date2__c  - Meeting_date_2__c ))/365)) &' Years' & ' ' & 

TEXT(FLOOR(MOD(( Meeting_end_date__c  - Meeting_start_date__c )+( Meeting_end_date2__c  - Meeting_date_2__c ),365)/12)) &' Months' & ' ' & 

TEXT(MOD(MOD(( Meeting_end_date__c  - Meeting_start_date__c )+( Meeting_end_date2__c  - Meeting_date_2__c ),365),30)) &' Days', 

 Experience2__c 
)


User-added image
Thanks
Jega
Sweet potato tec