Help

Re: Calculate the number of days

Solved
Jump to Solution
741 0
cancel
Showing results for 
Search instead for 
Did you mean: 
brightler
4 - Data Explorer
4 - Data Explorer

I need a formula that calculates the number of days we have owned a house.

Possession date to sold date and in the case there is no sold date I want it to calculate using today. TIA

1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

Try this: 

IF(
  {Posession Date},
  IF(
    {Sold Date},
    DATETIME_DIFF(
      {Sold Date},
      {Posession Date},
      'days'
    ),
    DATETIME_DIFF(
      TODAY(),
      {Posession Date},
      'days'
    )
  )
)

Screenshot 2024-02-07 at 11.08.35 PM.png

See Solution in Thread

2 Replies 2
TheTimeSavingCo
18 - Pluto
18 - Pluto

Try this: 

IF(
  {Posession Date},
  IF(
    {Sold Date},
    DATETIME_DIFF(
      {Sold Date},
      {Posession Date},
      'days'
    ),
    DATETIME_DIFF(
      TODAY(),
      {Posession Date},
      'days'
    )
  )
)

Screenshot 2024-02-07 at 11.08.35 PM.png

brightler
4 - Data Explorer
4 - Data Explorer

Perfect. Thank you