1 Reply Latest reply: Nov 4, 2018 3:49 AM by Stef Rawoe RSS

    Custom Calendar Period to Trimester -3 month interval

    Akbar Jiwani

      I have date field ProgramStartDate. Autocalendar provides me Quarter interval by default. I am looking to group programs by Timester. i.e. Programs in Jan to apr, May to Aug & Sep to Dec


      Any thoughts?

        • Re: Custom Calendar Period to Trimester -3 month interval
          Stef Rawoe

          I think you're talking about the quadrimester. Trimester is the same as quarter (total year divided in 4).

          So, the total year divided in 3.


          You can do this by:


          Consider the division as: The months are grouped by 4... which results in 3 pieces per year.

          E.g.: '01/03/2018' is the thirth month, 3/4 = 0,75, ceil rounds up to 1.

          '20/09/2018' = 9/4 = 2,25, ceil rounds up to 3


          Anyway, you can apply the same technique for different groupings:

          Trimester: ceil(month(ProgramStartDate)/3)

          2-month interval: ceil(month(ProgramStartDate)/2)

          Half year interval: ceil(month(ProgramStartDate)/6)