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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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