Hello, I am trying to troubleshoot the SAS code that was written (by someone else) to convert d, m, y into DOB. I noticed that August and September births were converted incorrectly and that they were converted to July births. I found a note saying that because partial dates are acceptable, missing day was substituted with 15 and missing month was substituted with 7. Here's the code I inherited. array MM[2] $ CHILDMTHB MMOBRTH array DD[2] $ CHILDDAYB MDAYBRTH array YY[2] $ CHILDYRB MYRBRTH array dates[2] CHILDOB MDOB do i=1 to 2; if compress(YY[i], '89')^='' then do; if (compress(MM[i], '89')^='') and (compress(DD[i], '89')^='') then dates[i]=mdy(input(MM[i], 2.), input(DD[i], 2.), input(YY[i], 4.)); else if (compress(MM[i], '89')='') and (compress(DD[i], '89')^='') then dates[i]=mdy(7, input(DD[i], 2.), input(YY[i], 4.)); else if (compress(MM[i], '89')^='') and (compress(DD[i], '89')='') then dates[i]=mdy(input(MM[i], 2.), 15, input(YY[i], 4.)); else dates[i]=mdy(7,15, input(YY[i], 4.)); end; Can someone tell me how to fix this? Thank you!
... View more