07-15-2015 03:18 PM
There is a date variable, containing different dates from 2000 to 2015, in my dataset. I need to group the observation by week. So I wrote the following code to generate the weekly values:
data new; set old;
The reason for using weekv5. is that I need to know the year and the week of each date.
The problem is that the outcome of the above code is in character format, but I need to compare the weekly_date, for example keep the observation with weekly_date greater than specific time. To do that, I think I need weekly_date should be in numeric format. How can I fix it?
Need further help from the community? Please ask a new question.