how i calcuate duration(in months) between two months

hey, i have an issue that is related to calculation of month. actually my line item which name is start month and End month that format is month(year). so with this how i calcuate duration(in months) between these Months. With this post i am attaching Screenshot Of Blueprint of my module.

Answers

  • Hi,

    Don't know if there is a direct method for this but one solution is to use formula:
    (YEAR(End Month) - YEAR(Start Month)) * 12 + MONTH(End Month) - MONTH(Start Month) + 1

    Include "+1" in the formula depending if you want to include end month in the figure. Use "-1" if you don't want to include start or end month in the figure. For example feb17-oct17 would be 9 with the formula above and feb17-dec18 would be 23.

    Hope this helps!

    Br,
    Jaakko