Skip to main content

Im trying to create a date difference between two date fields in data designer (Created Date and Current Date) say a Success Plan.

When creating a formula field for date type, Im confused why the second parameter wont load any date related field? Instead its showing an integer field. Also why it wont show option for “Today’s date” as it is available in Reports formula field? This seems to be a huge gap and a bug?

 

Hey @balajibv great question - there are a number of date related functions, and finding the right one can be a bit confusing.

If you are looking to find the difference between two dates, you need to select the field Data Type first as “Number”. Why? Because the output of the function is an integer - e.g., the number of Days between dates.

 

Then, make sure to select the Date Diff function. Then, it should work as you expect.

 

What you are looking at in your example, is a Date data type, and the Add/Subtract date function allows you to take a given date, and essentially go forwards or backwards in time some number of days/weeks/months etc., and output a Date.

 

You can read more about the functions here: https://support.gainsight.com/gainsight_nxt/Data_Designer/Admin_Guides/Formula_Fields_in_Data_Designer#Number_Formulas

The functions are essentially organized by the data type of the output, not necessarily the inputs going into the calculation. So, even though you want a date diff, it’s not a date field. Something to keep in mind when looking up other types of formulas.

Hope that helps!


@bradley FTW!

As someone new to working through these types of functions in DD and queries, this is hugely helpful. Thank you for the clear explanation!


Reply