Previous Topic: ADD_DAYS Function—Add Days to a DateNext Topic: TO_EXPLODED  Function—Convert Internal Date to Exploded Format


TO_EXTERNAL Function—Convert Internal Date to External Date

Use the TO_EXTERNAL function to convert a CA 1 internal date to a 10-byte character external date, according to the date format supplied.

DEF DATE_FMT     (X 10) = 'MMMDD YYYY'
DEF FUNCTION     (X 80) = NONE
DEF PRINT_DATE   (X 10) = NONE 'EXPDT' 'DATE'

SET FUNCTION = 'TO_EXTERNAL'
CALL CTSEDATE USING FUNCTION
                    PRINT_DATE
                    EXPDT
                    DATE_FMT