Below formula can be used to calculate age from date of birth in Salesforce –
IF(
NOT(ISNULL(BirthDate)), /* Condition to check to make sure BirthDate is not null */
TEXT(FLOOR((TODAY()-BirthDate)/365.2425)) & " year(s) " &
TEXT(FLOOR(MOD((TODAY()-BirthDate),365.2425)/30)) & " month(s)", /* Value IF True */
"" /* Value IF False */
)
Hi Manohar –
Feeling good that you liked it. Here is the formula which you can use –
Return type: text
TEXT(FLOOR((TODAY() – Date_Of_Birth__c)/365.25)))& " years" & TEXT(MOD((TODAY() – Date_Of_Birth__c),365.25)) & " days"
This comment has been removed by the author.
Hi Sudipta,
Thanks for the update.
I tried your formula like below, But date result showing wrong. Please once check and let me know.
Note: Dates showing wrong value and showing xxx.yy days format. I don't need decimal places, please update this.
IF(
NOT(ISNULL(Birth_Date__c)), /* Condition to check to make sure BirthDate is not null */
TEXT(FLOOR((TODAY()-Birth_Date__c)/365.2425)) & " year(s) " &
TEXT(FLOOR(MOD((TODAY()-Birth_Date__c),365.2425)/30)) & " month(s)" &
TEXT(MOD((TODAY() – Birth_Date__c),365.25)) & " days", /* Value IF True */
"" /* Value IF False */
)
Calculate age from Custom Birthdate__c through process Builder in salesforce
Please Suggest me