If what you want to do is validate the date and you are running PxPlus 2018 or newer, simply use the JUL function as in:
X=JUL(DateString$, DateFormat$,ERR=Error_Branch)
For example, all the following will fail:
JUL("40129C0","MMDDYY") ! Length wrong
JUL("131290", "MMDDYY") ! Month 30 is bad
JUL("022919", "MMDDYY") ! Not a leap Year
These will work:
JUL("022819","MMDDYY")
JUL("02/28/19","MM/DD/YY")
JUL("02-28-2019","MM-DD-YYYY")
JUL("02/28/2019","MM-DD-YYYY") ! The parser doesn't care what non-numeric delimiter you use