The CVTDAT command should be able to do the job.
Within CVTDAT, the DATE parameter would be your display file’s MMDDYY field. The TOVAR parameter would be a new 10-character variable that you would define in the CL. FROMFMT would be *MDY, TOFMT would be *ISO, and TOSEP would be a dash (‘-’).
I presume you are using a character variable for the QRYSLT parameter of the OPNQRYF command. Within that command, you should have a double-quote character both before and after the 10-character date variable used in the CVTDAT command.