Desktop productivity for business analysts and programmers

finding the week we are in the year

Accepted Solution Solved
Reply
Regular Contributor
Posts: 168
Accepted Solution

finding the week we are in the year

Hello,

 

I want to put the week number into a macro variable ex:

 

%let today=%sysfunc(today());

%let week=%???? week(&today, 'v');

%put &week gives 2...

 

any suggestion?

 

Regards,

Alain 


Accepted Solutions
Solution
‎01-09-2018 12:58 PM
Super User
Posts: 6,933

Re: finding the week we are in the year

Macro language won't need quotes around "v" so the middle statement becomes:

 

%let week = %sysfunc(week(&today, v));

View solution in original post


All Replies
Solution
‎01-09-2018 12:58 PM
Super User
Posts: 6,933

Re: finding the week we are in the year

Macro language won't need quotes around "v" so the middle statement becomes:

 

%let week = %sysfunc(week(&today, v));

☑ This topic is solved.

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

Discussion stats
  • 1 reply
  • 132 views
  • 0 likes
  • 2 in conversation