Help using Base SAS procedures

Next Tuesday

Reply
Super Contributor
Posts: 359

Next Tuesday

Is there a function which would easily give me the SAS date of next Tuesday? I know I can loop through days until Tuesday pops up, but if there is a simple function, I would like to use that instead.

Flip
Valued Guide
Posts: 2,177

Re: Next Tuesday

the function is INTNX
You will need an "adjusted interval", something like Weekday3 (iirc)
The doc are at http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a003065889.htm .

good luck

PeterC
Super Contributor
Posts: 359

Re: Next Tuesday

Thanks. It is exp_date = intnx('week.3', today(), 1);
Respected Advisor
Posts: 3,799

Re: Next Tuesday

'week.3'

[pre]
data _null_;
do d = today() to today()+14;
t = intnx('week.3',d,1);
put (d t) (+5 weekdate.-r);
end;
run;
[/pre]
Ask a Question
Discussion stats
  • 3 replies
  • 131 views
  • 0 likes
  • 3 in conversation