the order week of the Month

Accepted Solution Solved
Reply
Contributor QLi
Contributor
Posts: 57
Accepted Solution

the order week of the Month

I use SAS 9.1.  I want to get the order week of the month. such as 1st , 2nd , 3rd week of the month. Could anyone can help me ?

For example:

DateMonth need : WeeK_num_ of Month
15-MarMar3
16-MarApr3
17-MarMay4
18-MarJun4
19-MarJul4
20-MarAug4
21-MarSep4
22-MarOct4
23-MarNov4
24-MarDec5
25-MarJan5
26-MarFeb5
27-MarMar5
28-MarApr5
29-MarMay5
30-MarJun5
31-MarJul6
1-AprApr1
2-AprMay1
3-AprJun2
4-AprJul2
5-AprAug2
6-AprSep2
7-AprOct2
8-AprNov2
9-AprDec2
10-AprJan3
11-AprFeb3
12-AprMar3
13-AprApr3

Thanks in advance.


Accepted Solutions
Solution
‎04-26-2013 11:53 AM
Regular Contributor
Posts: 151

Re: the order week of the Month


All Replies
Solution
‎04-26-2013 11:53 AM
Regular Contributor
Posts: 151

Re: the order week of the Month

The SAS website has a solution for this.

http://support.sas.com/kb/41/732.html

Contributor QLi
Contributor
Posts: 57

Re: the order week of the Month

I tried it from the link  and worked it out. Thank you very much , Keith.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 168 views
  • 0 likes
  • 2 in conversation