How to: |
The AYM function adds months to or subtracts months from a date in year-month format. You can convert a date to this format using the CHGDAT or EDIT function.
AYM(indate, months, output)
where:
I4, I4YM, I6, or I6YYM
Is the legacy date in year-month format. If the date is not valid, the function returns the value 0 (zero).
Integer
Is the number of months you are adding to or subtracting from the date. To subtract months, use a negative number.
I4YM or I6YYM
Is the resulting legacy date.
Tip: If the input date is in integer year-month-day format (I6YMD or I8YYMD), divide the date by 100 to convert to year-month format and set the result to an integer. This drops the day portion of the date.
AYM adds six months to HIRE_MONTH and stores the result in a column with the format I4YM.
AYM(HIRE_MONTH, 6, 'I4YM')
For 99/04, the result is 99/10.
For 98/11, the result is 99/05.
WebFOCUS | |
Feedback |