Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.
Mar 16, 2021 02:41 PM
I’m trying to figure out how to use an IF statement with DATETIME_FORMAT({Birth Date}, ‘MMMM Do’).
Basically, I’m formatting the Birthday Field from the raw Birth Date field to remove the year and to put the date in a more reader-friendly format. However, when a birth date is missing, I get #ERROR. Is there a way to do an IF statement with an IF({Birth Date}=BLANK(),“Birthday Missing” with the DATETIME_FORMAT({Birth Date}, ‘MMMM Do’) as well? I tried just combining the two, but it won’t accept it as a valid format.
Here’s screenshots of the fields:
Thanks for your help! I’m new to Airtable so not so great yet.
Mar 16, 2021 03:08 PM
The IF
function can take either two or three parameters. It looks like you want three.
IF(
condition being tested followed by a comma,
what to show if the condition is true followed by a comma,
what to show if the condition is false with no comma at the end
)
I also find it easier to test if a field has a value, versus testing if it is blank.
IF(
{Birth Date},
DATETIME_FORMAT({Birth Date}, "MMMM Do"),
"Birthday missing"
)