Hi,
There's nothing built-in to do this, but you could try this JavaScript
const _MS_PER_DAY = 1000 * 60 * 60 * 24;
const _DAYS_TO_MONTH = 4800 / 146097; // 400 years have 146097 days and 400 years have 4800 months
const _MONTH_TO_DAYS = 146097 / 4800;
var date = util.scand("yyyy-mm-dd", DateOfBirth.rawValue);
var now = new Date();
var days = Math.ceil((now - date) / _MS_PER_DAY);
var monthsFromDays = Math.floor(days * _DAYS_TO_MONTH);
var months = monthsFromDays;
days -= Math.ceil(monthsFromDays * _MONTH_TO_DAYS);
var years = Math.floor(months / 12);
months %= 12;
var result = [];
if (years > 1) result.push(years + " years");
if (years == 1) result.push(years + " year");
if (months > 1) result.push(months + " months");
if (months == 1) result.push(months + " month");
if (days > 1) result.push(days + " days");
if (days == 1) result.push(days + " day");
app.alert(result.join(", "));
My date field is called DateOfBirth and if you want to store the result in a text field you will need to set its .rawValue property instead of the app.alert()
This also assume they haven't entered a date in the future.
Regards
Bruce