11-10-2015 11:16 AM - edited 11-10-2015 11:21 AM
I wanted to extract the Month and Year from the date and soft them by MonthYear.
After running the following code I see that MonthYear in sas dataset (want) is also $7. format. When I export the dataset to excel (os that I can do some manipulation in excel) I see that MonthYear is not in date format. Can someone please help.
11-10-2015 11:18 AM - edited 11-10-2015 01:57 PM
You haven't actually asked a question. It seems like your sample code would get you the month and year. What is the problem?
Now that you have added a paragraph to the original message, I withdraw my questions.
11-10-2015 12:41 PM
Why not make life easy and just create two variables:
y = year(date);
m = month(date);
They will pass to Excel easily, and can easily be sorted in any order you need.
Need further help from the community? Please ask a new question.