Jul 27, 2024 02:16 PM
Hello, I am stuck on something that seems simple, and I've tried navigating the answer here, but still can't get my formula to work.
I have two fields I'm working with, a check-in field, which is a dd/mm/yyyy field, and a check-out which is also a dd/mm/yyyy field. I don't always use both fields, though - sometimes one is blank, and sometimes both are blank.
I'm trying to calculate the # of nights between the two dates, and the formula is working fine, but returns "NaN" when there is no date. How can I correct the formula to simply leave that field empty if there are no dates?
Also, it seems to be wanting to calculate a sum, which I don't want it to do. Not sure why the Sum and Infinity symbols?
Here is my formula:
Thank you!
Jul 27, 2024 10:08 PM
Does this look right?
IF(
AND(
{Check-out},
{Check-in}
),
DATETIME_DIFF({Check-out}, {Check-in}, "days")
)
---
Not sure I'm following about the sum, infinity symbols bit though, could you tell me more about that?
Jul 28, 2024 02:22 AM
YES! Thank you so much! That worked. Appreciate it.