Help

Calculate the number of days

Topic Labels: Formulas
Solved
Jump to Solution
174 2
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
17 - Neptune
17 - Neptune

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
17 - Neptune
17 - Neptune

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