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

Age Calculation

How to Calculate in the Age in the salesforce year including months and days..


Use this formula

	NOT(ISNULL(BirthDate)), /* Condition */
	TEXT(FLOOR((TODAY()-BirthDate)/365.2425)) & " year(s) " & 
	TEXT(FLOOR(MOD((TODAY()-BirthDate),365.2425)/30)) & " month(s)", /* Value IF True */
	"" /* Value IF False */



It's very easy using the daysBetween and monthsBetween methods:


You'll probably have to use the Math.mod and Math.floor methods as well.