Hi, I am having a problem with a variable that is has two different formats in excel, number and date. I have tried the following piece of code which helped me before with a problem i had (Source: https://communities.sas.com/t5/Base-SAS-Programming/convert-variable-of-Char-and-numeric-to-date/m-p/283874#M57885) if index(num(k),'/') >0 then num_form(k)=input(num(k), mmddyy10.); else if num(k)~='missing' then num_form(k)= input(num(k), 8.); i was planning to convert to a date then back to a number but it didnt work which you can see in the image i attached. i have also tried if index(num(k),'/') >0 then num_form(k)=input(num(k), 8..); else if num(k)~='missing' then num_form(k)= input(num(k), 8.); which leaves me with blanks where the dates were. can someone please help??
... View more