Thanks again !!! It may be rough, but I split the variable again and it works!!! THANK YOU!!! data DC2; set chcdata_catcomb; Date1 = scan(Date,2,","); Date2 = scan(Date1,1,"("); NewDate = input(catt(Date2,",2005"),anydtdte21.); dayofweek = scan(date, 1, ","); format NewDate yymmdd10.; run; proc contents data=DC2; run;
... View more
Thank you so much. I am almost there! I have some dates that were appended with a (1) or a (2). I just need to strip that off before adding the year. Everything else is working! the anydtdte21. the "21" is what fixed the last error I was having. K-
... View more
Thanks Reeza, I do have the year in a different column (2005). I attached the file. I tried this code and got the NewDate variable, but only got what I believe is a julian date (19449) in the cells that have a repeated date... Wednesday, Apr 13(1) and Wednesday, Apr 13(2) -- The DOW returned an error. -- data Spring21.DC2; set Spring21.chcdata_catcomb; NewDate = input(catt(scan(Date,2,","),",2005"),anydtdte.); /* DOW = dow(y); */ proc contents data=spring21.DrewC2; run;
... View more
I have a file where my date came in as a character and I need to make it a date to use it in Forecasting. My variable date looks like this: Friday, April 8 Saturday, April 9 Sunday, April 10 ... What code would I use to make a character variable for DOW and a second variable for the date mmdd? Thanks, K-
... View more