ASM
A minor correction to my code which read:
lcDATE = SUBSTR(lcMYDATE,6,3)+RIGHT(lcMYDATE,2)+LEFT(lcMYDATE,4)
It should actually be:
lcDATE = SUBSTR(lcMYDATE,6,3)+RIGHT(lcMYDATE,2)+"/"+LEFT(lcMYDATE,4)
The other "/" character was not being placed by any of the string extractions. The first one is coverd in the SUBSTR, the other two were not. Also, I think I was a little vague in my explaination as to WHY you were getting " / / ", upon re-reading it. To be more specific, the SUBSTR line that you are issuing:
ctod(substr(field1,1,6))
Is returning a blank date, because your date value looks like one of two things:
1) "2001/01/01" which will return "2000/0", and when placed through the CTOD function will return " / / "
or
2) "01/01/01" which when run through your code will return "01/01/" which will also when placed through the CTOD function will return " / / ".
So, as mentioned before, you need better manipulation of your date strings before putting them through the CTOD routine. That should solve your troubles...
Sorry for the vagueness of my first response.
Thanks,
-Scott