I'm very new to SAS and I am trying to import a CSV file with a variable that has dates. When I import it in it looks fine (in the correct format). However when I am trying to create a new variable it does not recognize the dates. I'm currently using SAS 9.3. For example: PROC IMPORT DATAFILE= "S:\eSTAR\NDSR Data\NDSR_6_21_16.csv" out=NDSR dbms=csv replace; GETNAMES=YES; run; DATA ndsr; set ndsr; format date Date9.; run; data ndsr_new; set ndsr; if id=201 AND date=7/9/2015then flag=1; run; When I run this syntax it creates the variable flag however it doesn't recognize the date I entered it and so therefore it shows as missing. I have tried to change the format of the date variable to other date formats by SAS (e.g. DDMMYYD10.) Any help would be appreciated!
... View more