Month_Diff
Syntax: Month_Diff(ccyymmdd1_dateStr, ccyymmdd2_dateStr)
Arguments:
- ccyymmdd1_dateStr is a DateString datatype in yyyymmdd format, for example, 20210615.
- ccyymmdd2_dateStr is a DateString datatype in yyyymmdd format, for example, 20210615.
Return Type: Real
Description: Returns the number of month boundaries crossed from ccyymmdd2_dateStr to ccyymmdd1_dateStr. The function always returns a whole number. For example, 20210131 to 20210201 is one month.
Example:
if (Month_Diff(CRTRAN25.transactionDate,CRTRAN25.openDate) < 4)
then {ACCT_UDVCardAge = 1}
else {ACCT_UDVCardAge = 2;}
This rule sets an ACCT_UDVCardAge UDV to different values depending on the number of months that have passed since a credit account was opened. It uses the Month_Diff function to calculate whether the number of month boundaries passed from the card-open date to the transaction date is less than four. If so, it sets ACCT_UDVCardAge to 1 and if not, to 2.