17500 !************************************************************ & ! & ! & ! FN.INV.M11CNV$ (X$) & ! & ! & ! This function takes an argument in the form & ! "yymmdd" and returns its corresponding DEC & ! standard date representation, "dd-MMM-yy". & ! This is the inverse to what the subprogram & ! M11CNV does. Please note this function does & ! no validation on any of the fields except to & ! return "XXX" for a bogus month number. & ! & ! & !************************************************************ & 17510 DEF FN.INV.M11CNV$ (X$) & & \ FN.INV.M11CNV$ = "" & \ GO TO 17540 IF X$ = "" ! Return nothing if given nothing. & \ Z9.MONTH$ = "XXX" & \ ON ERROR GOTO 17530 & \ Z9.MONTH% = VAL ( SEG$ (X$,3%,4%)) & \ Z9.MONTH$ = MID ("JanFebMarAprMayJunJulAugSepOctNovDec", & (Z9.MONTH% * 3%) - 2%, & 3%) & ! Define the function, get set to trap on bad month number. & ! If we don't trap, then yank the correct text month out of the & ! month list. & 17530 ON ERROR GOTO 19000 & \ FN.INV.M11CNV$ = MID(X$,5%,2%) + "-" + & Z9.MONTH$ + & "-" + MID(X$,1%,2%) & ! Restore error trap, set function value. & 17540 FNEND &