Is there a way to calculate age in years, months & days?
I currently use a formula, which works fine, to calculate age in years. Going forward I need to calculate years, months & days. This is the formula I'm using now:
var Number BirthYear = Year ([Date of Birth]);
var Number BirthMonth = Month ([Date of Birth]);
var Number BirthDay = Day ([Date of Birth]);
var Number CurrentYear = Year(Today ());
var Number CurrentMonth = Month(Today ());
var Number CurrentDay = Day(Today ());
var Text BirthMonthTiming = If($BirthMonth < $CurrentMonth, "Earlier",
If($CurrentMonth=$BirthMonth, "Same", "Later"));
var Bool LaterDayOfMonth = $CurrentDay < $BirthDay;
Case ($BirthMonthTiming,
// if the BirthDate is in an earlier month, then age is this year - birthyear
"Earlier",$CurrentYear - $BirthYear,
// if not in an earlier month, see if it's in the same month; if so, we
// have to check the date
"Same",If ($LaterDayOfMonth, $CurrentYear - $BirthYear - 1, $CurrentYear - $BirthYear),
"Later", $CurrentYear - $BirthYear - 1)