Solved

Advanced Datediff formula

  • 31 August 2021
  • 2 replies
  • 109 views

Badge +2

Good morning -

 

I’m trying to build a datediff formula in a calculated field that would find the difference between a start and end date, but if the end date was blank it would use today.  Is that possible without leveraging the rules engine?

icon

Best answer by Justin Bills 31 August 2022, 21:11

View original

2 replies

Userlevel 3
Badge +2

Did you ever find a way to do this without rules engine?

Badge +2

Hi @jessica_owens  -  I did!!

I made a custom calculated field:

CASE
    WHEN (field end date) IS NULL THEN gsdateDiff( field start date , gstoday( ) , 'DAY' )
    ELSE gsdateDiff( start date , end date , 'DAY' )
END

 

The bold/italic would be replaced by whatever your fields are in your instance! :)

Reply