Skip to main content

Date Format Formula ERROR - help!

  • November 20, 2020
  • 1 reply
  • 11 views

Forum|alt.badge.img

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

Forum|alt.badge.img+17
  • Inspiring
  • November 20, 2020

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.