Skip to main content

Formula Output to be recognized as numbers

  • September 1, 2018
  • 1 reply
  • 21 views

Hello! I am trying to do a sum of days! Here is what I have

IF(Delivery=BLANK(),"", DATETIME_DIFF(Return,Delivery,‘days’))

I am getting a number output of the difference of days, (IR: 2, 7, 14) however they are not recognized as numbers because they are in a formula column, therefore I am unable to see the sum of all those days in my column.

This topic has been closed for replies.

1 reply

Forum|alt.badge.img+5
  • Inspiring
  • September 2, 2018

Your problem is that explicit empty string in your formula — it causes it to return everything as a string. You can either get rid of it —

IF(Delivery=BLANK(),BLANK(),DATETIME_DIFF(Return,Delivery,'days'))

— or (my preference), make it unnecessary:

IF(Delivery,DATETIME_DIFF(Return,Delivery,'days'))

(The latter version says, implicitly, "IF {Delivery} IS NOT BLANK, DO DATETIME_DIFF(), OTHERWISE BLANK().)