Formula for AGE based on a property BIRTHDAY

What I’m trying to do

I have a property for BIRTHDAY (YYYY-MM-DD) and I want to add a property for AGE (just years old, not months and days).

Things I have tried

I’ve tried a few of the solutions in the forum as well as searching AI (Claude, etc) for the right formula to enter in Source Mode in my template. I know it’s something like “Today’s Date” - Birthday but everything I’ve tried doesnt calculate. I’m not ver experienced with this stuff and would appreciate any help (pretend I’m a toddler, which I am when it comes to this stuff)

Hi,

try using this formula: (now() - birthday).years.floor()

For this to work the property birthday has to be of type date. In case the above formula is marked as valid but the field says “Invalid Operator between Date and String”, you have to wrap birthday in a date-function like this: date(birthday)
The complete formula would then be (now() - date(birthday)).years.floor()

I’ve used this in my base and haven’t tested it elsewhere but it should work :))

Hope this helps!