Jan 23, 2019 08:26 AM
Hi everyone,
So I’m encountering a problem: Below you can see the output of my IF() formula, the output is a duration, but I can’t seem to format it this way. I would like to format it in HH:MM, but I tried everything i could think of, but It won’t come out right. It stays, what i think is an integer number.
Any thoughts?
Jan 23, 2019 09:05 AM
Your formula needs to be IF({Date to Declined}!="",DATETIME_DIFF({DATE To DECLINED},Date,'seconds'),"")
. Then you need to click the “Formatting” in the Customize Field Options panel. Select “duration” from the dropdown.
Jan 23, 2019 01:30 PM
I clarify that the result must be seconds
because that is the unit used by the Duration field.
Jan 25, 2019 07:32 AM
It’s a bit tricky, but actually in order to format the result as a duration, you should not specify a unit as a third parameter
Also you need to use BLANK()
instead of ""
in the value returned by the IF()
otherwise it will be formated as a string.
Your formula should be:
IF({Date to Declined}!="",DATETIME_DIFF({Date to Declined},Date),BLANK())
Then you should have the ability to format the result as a duration.
Jan 25, 2019 01:36 PM
Works both ways for me:
I think they mean you don't need the unit parameter
:man_shrugging:
Jan 26, 2019 01:53 AM
Actually, that closing BLANK()
isn’t necessary (and leaving off the null response avoids any confusion over BLANK()
vs ''
).
IF(
{Date to Declined}!="",
DATETIME_DIFF(
{Date to Declined},
Date
)
)
works fine.