Age calculation

try this:

calculation: age = round((decimal-date-time(today()) - decimal-date-time(${dob})) div 365)

Note, this isn’t 100% precise, because it assumes all years have 365 days, which isnt the case for any intervening leap years. So if the date-of-birth is within a few days to today, you could potentially end up a year off. If you need 100% accuracy you’ll have to correctly account for these additional leap year days, which would require a more complicated algorithm.

1 Like