Skip to main content
Solved

Get rid of #ERROR! in formula field?

  • February 4, 2020
  • 1 reply
  • 9 views

Can someone help me with my formula? I have an “aging” column that I use to show months since the publish date of my blog posts. This works well when I have a publish date, but, for unscheduled posts it returns an ugly #ERROR!

I would like it to either show blank, or N/A. Here’s my formula.

DATETIME_DIFF(TODAY(),{Publish Date},'months')

Best answer by Jeremy_Oglesby

Just surround the whole thing in a conditional that checks for the presence of a Publish Date:

IF(
   {Publish Date},
   DATETIME_DIFF(
      TODAY(),
      {Publish Date},
      'months'
   )
)

1 reply

Forum|alt.badge.img+18
  • Inspiring
  • Answer
  • February 4, 2020

Just surround the whole thing in a conditional that checks for the presence of a Publish Date:

IF(
   {Publish Date},
   DATETIME_DIFF(
      TODAY(),
      {Publish Date},
      'months'
   )
)