Forum Discussion

Embry3894's avatar
Embry3894
Copper Contributor
Jul 16, 2024

Datedif with hired date term and rehire

=(DATEDIF(E26,F26,"Y")+DATEDIF(K26,$L$2,"Y"))&" Y "& (DATEDIF(E26,F26,"YM")+DATEDIF(K26,$L$2,"YM"))&" M"

This is giving me months greater than 12. How do I correct this?

 

  • Embry3894 

    You add the years of both periods and the months of both periods separately. An approximation would be

    =QUOTIENT(F3-E3+$L$2-K3, 365.25)&" Y "&QUOTIENT(MOD(F3-E3+$L$2-K3, 365.25), 365.25/12)&" M"

Resources