MonthsBetween

STD.Date.MonthsBetween( fromDate, toDate)

fromDateThe first date value in Date_t format.
toDateThe last date value in Date_t format.
month_ends_equalOptional. If TRUE and both dates fall on the last day of their respective months, the difference between the dates will be treated as whole months regardless of the actual day values. If FALSE then the day value of each date is considered when calculating the difference. The default is FALSE
Return:MonthsBetween returns an INTEGER value of the number of whole months between the two dates.

The MonthsBetween function calculates the number of whole months between two dates.

Example:

IMPORT STD;
StartDate := 19631122;
numMonths := STD.Date.MonthsBetween(startDate,STD.Date.Today());
      // numMonths contains the number of months between the startDate and today's date