Previous Topic: FROM_EXTERNAL Function—Convert CA Earl Date to CA 1 DateNext Topic: ADD_WORK Function—Add Work Days to a Date


ADD_YEARS Function—Add Years to a Date

Use the ADD_YEARS function to add a number of years to a date, producing a resultant date. All fields are four-bytes packed. Dates are CA 1 internal dates.

DEF FROM_DATE    (P 7.0) = NONE 'FROM' 'DATE'
DEF YEARS        (P 7.0) = NONE 'YEARS' 'ADDED'
DEF RESULT_DATE  (P 7.0) = NONE 'RESULT' 'DATE'
DEF FUNCTION      (X 80) = NONE
SET FROM_DATE = EXPDT
SET YEARS     = 3
SET FUNCTION  = 'ADD_YEARS'

CALL CTSEDATE USING FUNCTION
                    FROM_DATE
                    YEARS
                    RESULT_DATE