Jun 01, 2016 03:26 PM
Having trouble locating a logical operator for “not equal to” and a way to reference a blank field
This formula is references 2 fields; Start Date and Finish Date. The formula is intended to return the age in days of the task I am tracking.
This should give me the amt of day between Start Date and Finish Date if Finish Date is not blank, else the amt of days between Start Date and Today
IF({Finish Date} [has a date/isnt blank] ,DATETIME_DIFF({Start Date}, {Finish Date}),DATETIME_DIFF({Start Date}, TODAY()))
What should I put here to make this formula work? What am I missing?
Jun 04, 2016 01:15 AM
I think that’s just a simple >"" so,
IF({Finish Date} > “”, DATETIME_DIFF({Finish Date}, {Start Date}, ‘days’),DATETIME_DIFF(TODAY(),{Start Date}, ‘days’))
Jun 06, 2016 05:13 AM
You also could do (i didn’t test it though but used that NOT()
function in another context):
IF(NOT({Finish Date} = ""), DATETIME_DIFF({Start Date}, {Finish Date}), DATETIME_DIFF({Start Date}, TODAY()))
Mar 22, 2018 01:24 PM
This does not work for testing a number field as it evaluates NULL as zero.
Mar 23, 2018 07:07 AM
If that’s so, would >0
work? There is an inequality operator !=
for string comparisons.
But to address the original post directly, you simply use the field as the test case, i.e. the first part of that formula would be:
IF({Finish Date},...
Jul 22, 2021 07:14 PM
@Tyler_Dunlap, the following formula will do what you want.
IF({Finish Date}, DATETIME_DIFF({Finish Date}, {Start Date}, "days"),DATETIME_DIFF(TODAY(), {Start Date}, "days"))
There are three things that were solved.
Hope this make sense.