IF(
MONTH(TODAY())>MONTH(DOB__c),
YEAR(TODAY())-YEAR(DOB__c),
IF(AND(MONTH(TODAY()) = MONTH(DOB__c), DAY(TODAY()) >= DAY(DOB__c)),
YEAR(TODAY())-YEAR(DOB__c),
(YEAR(TODAY())-YEAR(DOB__c))-1)
)
http://developer.force.com/cookbook
MONTH(TODAY())>MONTH(DOB__c),
YEAR(TODAY())-YEAR(DOB__c),
IF(AND(MONTH(TODAY()) = MONTH(DOB__c), DAY(TODAY()) >= DAY(DOB__c)),
YEAR(TODAY())-YEAR(DOB__c),
(YEAR(TODAY())-YEAR(DOB__c))-1)
)
http://developer.force.com/cookbook
No comments:
Post a Comment