Date Diff function enhancement in Rules Engine

Related products: None

Currently in Date Diff function we can substract between two date values fields, can we also add


rule date in list of available values.





Eg Renewal Date - Rule Date 
I too think this would be helpful. One thing we have setup in our instance to use in cases like the example here is a formula/date field on the Customer Info object in Salesforce with the formula TODAY(). This then becomes a field you can use in rules to capture the DateDiff between Renewal Date and Rule Date. 





Having a "Rule Date" field available in DateDiff calculations would become helpful for me in rules where I have to Merge the Customer Info object just for the "Today" field we have created. I often create a dataset from the Customer Info object just for this handy "Today" field when setting scorecard rules from data that is in MDA. e.g. usage data is in MDA, I can't create a similar formula/date field in the MDA object (at least, I don't think this is possible), so to calculate something like "number of days since last user login" I have to join the field "Today" that I have setup on the Customer Info object. 
Hi Anirudh/Pele, 





This is a great use-case,this is already added to our road-map and will let you know once we take it up for release!





Thanks for posting!
Awesome news– thanks, Sai!
Hi All,





This feature is coming in October release. you should be able to achieve following




  • Rule Date will be a new formula - help you get Rule Date as a show field.

  • Date Diff will support difference from any Date field to Rule Date

  • Date Diff can be now signed value 


I echo that this is a very useful feature enhancement.  Is there a workaround in the meantime?  For example want to calculate the age of the ticket in the rules engine ... how do I calculate "Rule Date - Created Date" for the Case object in SFDC?? 
Hi All, Date Diff function is available in October release.





Date Diff function subtracts the start datetime field value from the end datetime field and it returns the difference in number of days. Previously, even if the end datetime field had a lower value than start datetime field, the result (number of days) was converted to a positive value. Now, the Get Signed Value checkbox is introduced. If you select the checkbox, negative values are not converted to positive values in the result.





Please refer the release notes for more information. 





Thanks for posting!​

Hello Everyone!

The Add/Subtract Date Formula field in the Date Formulas of Transformation Tasks now accepts dynamic fields. Previously, this field accepted only static numeric values as input. With this v6.16 release, the number of days you add to or subtract from a date dynamically changes with the value of the selected field. 

Also, Gainsight introduces new Number Formulas to the Formula Fields in Rules Engine. These enable you to perform powerful calculations in your Transformation Tasks while setting up a rule. 

This feature is implemented in both SFDC & NXT versions.

Thanks for posting!