BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
QLi
Fluorite | Level 6 QLi
Fluorite | Level 6

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Keith
Obsidian | Level 7
2 REPLIES 2
Keith
Obsidian | Level 7

The SAS website has a solution for this.

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

QLi
Fluorite | Level 6 QLi
Fluorite | Level 6

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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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