tldm-universe/CMS/BP.CLOCK/DT.CVT
2024-09-10 15:25:06 -04:00

30 lines
595 B
Plaintext
Executable File

* DT.CVT
*
* BY WILLIAM GULBRANDSEN : 03-21-90
*
* UPDATES :
*
* ELH 09-22-90 : PROCWRITE a formatted date
*
*-------------------
*
* THIS PROGRAM WILL TAKE A DATE INPUTTED AND CONVERT IT TO INTERNAL FORMAT
* NOTE : EXTERNAL DATE MUST BE IN 1ST BUFFER POSITION
*
*------------------
*
PROCREAD BUFFER THEN
DATE = OCONV(BUFFER,"G0 1")
LEN.REC = LEN(BUFFER)
ST.PNT = INDEX(BUFFER," ",1)
IF ST.PNT > 0 THEN KEEPER = BUFFER[ST.PNT,LEN.REC] ELSE KEEPER = ""
END ELSE
DATE = DATE()
END
DATE = ICONV(DATE,'D')
KEEPER=KEEPER:" ":OCONV(DATE,"D2/")
BUFFER = DATE:KEEPER
PROCWRITE BUFFER
*
STOP