but one of my drug name has DEC03 so when it comes to that CSV file it is showing it gas 3-Dec. How can I solve this?
Your CSV file is fine. The problem is that you are using Excel to look at the file. A CSV file has no information about the the data types for a column. So the program that reads it has to set its own data types. Excel does a bad job of this.
Either open the file in some other application. Or if you must open it with Excel then start Excel first and use the menus to open the file so you get a step along the way to tell it what type of data each column contains. In my current version of Excel there is a menu option "From Text/CSV" under the "Data" menu.
Your second example is NOT giving you an Excel file. It is creating a CSV file. You might be allowing your computer to automatically open Excel to read the file, but it is NOT an Excel file.
Did you read the manual on PROC EXPORT? Do you have specific questions about how to use it? Did you find the section for how to set the delimiter that is used? Show what you have tried and the resulting lines from the SAS log. Make sure to use the Insert Code icon to get a pop-up window where you can paste the lines so the forum doesn't try to format it as if it was text paragraphs.
but one of my drug name has DEC03 so when it comes to that CSV file it is showing it gas 3-Dec. How can I solve this?
Your CSV file is fine. The problem is that you are using Excel to look at the file. A CSV file has no information about the the data types for a column. So the program that reads it has to set its own data types. Excel does a bad job of this.
Either open the file in some other application. Or if you must open it with Excel then start Excel first and use the menus to open the file so you get a step along the way to tell it what type of data each column contains. In my current version of Excel there is a menu option "From Text/CSV" under the "Data" menu.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!