Calculate days within date range, but returning a 1 if start and end is the same date

Hi Everyone, I’m trying to figure out a formula and am wondering if anyone here might know the answer:

I’m trying to calculate the days between a Start Date and End Date, but if the Start and End Date is the same, I want that to = 1.

I’m using the DATETIME_DIFF formula, but when the Start/End is the same, it returns a 0 when I want a 1.

Thank you!

IF(
   AND({Start Date}, {End Date}),
   IF(
      {Start Date} = {End Date},
      1,
      DATETIME_DIFF({End Date}, {Start Date}, 'days')
   )
)
1 Like

Welcome to the community, @Kristine_Guzman! :smiley: Did the reply from @Kamille_Parks answer your question? If so, please mark her comment above as the solution to your question. This helps others who may be searching with similar questions. Thanks!

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