Skip to main content
Contributor ⭐️
May 14, 2019
Question

Converting days into months using rule engine.

  • May 14, 2019
  • 3 replies
  • 101 views
Hi,

How we can convert no. of days into months in gainsight rule engine. I want no. of months between two dates. I can get no. of days using datediff function but how to get no. of months from it.

Thanks

Amit

3 replies

dan_ahrens
Expert ⭐️⭐️⭐️
May 14, 2019
Hi Amit, would simply dividing the number of days by 30 be sufficient for your use case?

VP of Customer Success at Forcepoint
amitmehtaAuthor
Contributor ⭐️
May 14, 2019
Hi Dan,

It will give correct result in case value < 30 ?

dan_ahrens
Expert ⭐️⭐️⭐️
May 14, 2019
Well this depends on the level of precision that you need.

In most cases, counting the number of months between two dates can be derived by dividing the number of days by 30. In the cases where the number of days is less than 30, do you want that to count as a month or not as a month?

VP of Customer Success at Forcepoint