Date formula referring to 2 feilds

Hello wonderful community! I am still having trouble wrapping my brain around IF/THEN situations and thought I would just ask :slight_smile:
I have 2 date fields in my record:

Join Date
Cancel Date

I have a formula field that calculates months committed based on todays date that is working great:

DATETIME_DIFF(
NOW(),
{Patronage Since Date},
‘months’
)

But I want to have the formula look for a Cancel date and use that first…and if there is no cancel date to go ahead and use todays date. How to I amend my formula? Thank you so much!

DATETIME_DIFF(
   IF({Cancel Date}, {Cancel Date}, NOW()),
   {Patronage Since Date},
   'months'
)
2 Likes

Thank you so much! This seems to have worked perfectly :slight_smile:

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.