Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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:
ceil(month(ProgramStartDate)/4)
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)
etc.