The ANYDTDTE. informat cannot handle those 7 digit strings since there is no good way to tell where the missing digit should be added.
But you should be able to use the new REGEXE features of PROC FORMAT to define your own format.
Let's call this new informat MDYYYY to emphasize that it assumes there are always 4 digit years and that Month comes before Day.
I have added a rule to assume that if the string has only 6 digits then assume that it has both a one digit month and a one digit day.
invalue mdyyyy (default=8)
's/([01][0-9])([0-9]{5}?)/${1}0$2/' (regexpe) = [mmddyy8.]
's/(\d)([0-9]{5}?)/0${1}0$2/' (regexpe) = [mmddyy8.]
'/[0-9]{8}?/' (regexp) = [mmddyy8.]
other = _error_
;
... View more