Hi All, Currently I am working on a requirement where we need to comp

Certified Senior Developer
Hi All,

Currently I am working on a requirement where we need to compute the number of months based on start date and end date. Suppose say for example start date is 25/12/2015 and end date is 31/03/2017. The total number of months should be calculated as 15 months including the date precision. How to achieve this functionality?

OriginalPostID-183629

OriginalPostID-183629

  Discussion posts and replies are publicly visible

Parents
  • @souravs I would like to suggest you to follow a precise approach rather than depending on things such as calculating based on the days in between etc. Further I would like to suggest you to go through the attached code snippet once as I believe that it's the actual way of doing and doing so will also lead to accurate results as well as allows to control the inclusive/exclusive behavior if needed.

    Let's see if there are any other better suggestions from the community.
Reply
  • @souravs I would like to suggest you to follow a precise approach rather than depending on things such as calculating based on the days in between etc. Further I would like to suggest you to go through the attached code snippet once as I believe that it's the actual way of doing and doing so will also lead to accurate results as well as allows to control the inclusive/exclusive behavior if needed.

    Let's see if there are any other better suggestions from the community.
Children
No Data