Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
How to Calculate in the Age in the salesforce year including months and days..
Use this formula
IF( 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:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_date.htm
You'll probably have to use the Math.mod and Math.floor methods as well.
Use this formula
It's very easy using the daysBetween and monthsBetween methods:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_date.htm
You'll probably have to use the Math.mod and Math.floor methods as well.