03-30-2016 12:27 PM
I am having a problem with date conversion. Sor some reason when I pull information from my datawarehouse using the datapart function in SQL the number ends up with a character format. When I use the same procedure on a different table that has the date formatted the same way, the variable comes down as a numeric. I checked the tables to make sure they are formatted the same way, and they are exactly the same. In the meantime I just pulled the data using SQL in step one, and formatted the data in a "data step" in step two and that works. But I am wordering if this is a common problem. I had been running this job for over 2 years and had no problems. I have enclosed an attachment that details my results. SAS enterprise guide 6.1 64-bit
03-31-2016 03:59 PM
@pangea17 I see you "liked" my post. Does that mean it help you solve the problem and if so could you show the code you changed or whatever you did. It would help to know if/how you fixed it. It may be useful to others.
03-31-2016 04:26 PM
Did you try the option?
A problem will result if later code treats that variable as a DATE rather than as a DATETIME.
The only workaround is to turn off implicit pass-through so that the function is not passed
to the DBMS and is instead processed by SAS. This can be done by setting the DIRECT_EXE= LIBNAME option.