So, I'm currently working on SAS homework and I've come across an infuriating issue. I'm trying to convert a date (numeric data type with a permanently assigned DATE9. format) to a character data type so I can concat it with another character. So I'm taking a data set and using it to create a new temp data set. According to the professor, we need to use put or input and this is what the output should look like: So the issue I'm having is when I use the put function to convert ship_date (Ship_Date = put(Ship_Date, DDMMYY10.); ) this is the output I get: However, if I were to create a new variable from ship_date ( Ship_Date = put(Ship_Date, DDMMYY10.); ) I get the wanted output. This is driving me absolutely bonkers as I cannot figure it out. Here is my full SAS code: data shipping_notes; set orion.shipped; Ship_Date = put(Ship_Date, DDMMYY10.); Price = input(Price, dollar7.2); length Comment $ 21.; Comment = cat('Shipped on ', Ship_Date); Total = Quantity * Price; run; proc print data=shipping_notes; format Total dollar7.2; run; I know I have to be overthinking this, I just can't figure out what I'm doing wrong.
... View more