Skip to main content
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



Hi Amit, would simply dividing the number of days by 30 be sufficient for your use case?




Hi Dan,





It will give correct result in case value < 30 ?




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?




Reply