Help

Re: Date Format Formula ERROR - help!

408 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Mac_Korasani
4 - Data Explorer
4 - Data Explorer

Hey all, I have a formula to generate a date and then format it, here’s what it looks like:

DATETIME_FORMAT(DATEADD({Touch Point}, (SWITCH({Coin Type}, ‘Platinum’, ‘3’, ‘Gold’, ‘6’, ‘Silver’, ‘12’, ‘Copper’, ‘Null’)), ‘months’), ‘MMMM-YYYY’)

My {Touch Point} field however sometimes may not have a date entered. In situations like that I want the formula to return blank (Null) as opposed to ERROR.

Any ideas?

1 Reply 1
JonathanB
8 - Airtable Astronomer
8 - Airtable Astronomer

I’ve noticed this generally happens with date fields when you use a formula and the date field is empty. A possible workaround might be to use IF({Touch Point}="", “”, {Touch Point}) as a separate formula field, so that empty values are rendered blank, and then refer to that in your main formula. Seems Airtable treats dates differently when they come from a formula field as opposed to a date field.