Determining week range

Reply
Contributor
Posts: 26

Determining week range

Scenario:

Week1 – week4

How do we determine that 8th of June is the first week of the months (as it is the 8th day )?

The reason of this is to determine the week range of the months.

I want to create a column that will tell me that a specific day of the months is either week1 –week4.

Contributor
Posts: 25

Re: Determining week range

Posted in reply to Allistair

Will the following work for you:

data temp;

date_test = '08JUN2013'd;

week=intck('week',intnx('month',date_test,0),date_test)+1;

run;

proc print;

run;

Further reading: 41732 - Determine the week number of a month

Ask a Question
Discussion stats
  • 1 reply
  • 146 views
  • 0 likes
  • 2 in conversation