It looks like you're new here. Sign in or register to get started.
LOCAL CalculateQuarters(piFromDate : Date;piToDate : Date) rQuarterCount : Integer rQuarterCount := 0; lrDate.SETRANGE("Period Start",piFromDate,piToDate); lrDate.SETRANGE("Period Type",lrDate."Period Type"::Quarter); IF lrDate.FINDFIRST THEN rQuarterCount := lrDate.COUNT;
MESSAGE( FORMAT( CalculateQuarters(010119D,311219D) ) );
Answers
Sample code on calculating full quarters between two dates:
Usage sample:
As to where to use it, that would depend on your need...
Arhontis
https://forum.mibuso.com/search