I have an age formula that returns an "error" if no birthday is available. How do I remove the "error"

I have an age formula that returns an “error” if no birthday is available. How do I remove the “error”

1 Like

Hi Greg, were you able to fix this? I’m having the same issue

You can use a conditional statement to return a blank cell if the “Birthday” field is empty:

IF(Birthday, DATETIME_DIFF(NOW(),Birthday,’years’),BLANK())

That should do it.

1 Like

The above didn’t work for me.
But this worked okay.

IF({Birthday}=BLANK(),BLANK(),DATETIME_DIFF(NOW(),{Birthday},‘years’))

Hey @John_Buttner

I wrote that post before I had a realization that straight quotes were constantly being converted to curly quotes in the forum editor 😆. Those curly quotes in my answer above cause problems in the Airtable formula editor.

Glad you found a variation that works for you. Just want to follow up that for clarity’s sake, your (and my) formulas can be simplified to this:

IF(Birthday, DATETIME_DIFF(NOW(),Birthday,'years'))

And I’ve carefully vetted that for the right type of quotes!

I new at AirTable but have MSoft Access programing experience.

Yep that works and I like it much better.
Thanks for the simplified code. :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.