Hello, I am using SAS 9.3 and I have a variable "DATEOFDIAGNOSIS". When I look in the Column Attributes of the Viewtable, it has a format of BEST12. informat of BEST32., length is 8, and type is numeric (Example: 20090930). I would like to change this variable into a SAS date value, so I can use it to do date calculations. I want to have it in date9. informat. I tried a bunch of different code after researching and in some cases, only some of the dates converted and others were left blank. I tried the following codes and did not work: data demo2; set demo; DATEOFDIAGNOSIS2 = input (put(DATEOFDIAGNOSIS, 12.), yymmdd8.); format DATEOFDIAGNOSIS2 YYMMDD8.; run; data radtumorreg3; set radtumorreg2; char_var = put(DATEOFDIAGNOSIS,12.); sas_date = input (char_var, mmddyy8.); format sas_date date8.; run; Thank you!
... View more