• David John 47
  • NEWBIE
  • -1 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I have DOB (API Name : BirthDate__c) and I want to calculate age in years and months. I have created two formula fields
 
Age in years

FLOOR((TODAY()- BirthDate__c )/365.2425)
 
Age in months (remaining months)

FLOOR(MOD((TODAY()-BirthDate__c),365.2425)/30)

If date of birth is 11 Aug 2013 and todays date is 11 Aug 2015, this gives result as 1 year 12 months. Instead the result should be 2 years 0 months.