Help using Base SAS procedures

list all weekdays between 2 years

Reply
Contributor
Posts: 56

list all weekdays between 2 years

I want to list all weekdays between 2 years say, 19990101 to 20001231

Any one can help me?

Thanks and Regards
Fred
Valued Guide
Posts: 2,177

Re: list all weekdays between 2 years

Posted in reply to Fred_Gavin
Monday, Tuesday, Wednesday, Thursday, Friday
it repeats a lot ;-)
[pre]
data weekdays;
do date = '1jan1990'd to '31dec2000'd ;
w= weekday( date) ;
if w not in( 1,7) then output ;
end ;
stop;
run ;[/pre] not sure why !


Message was edited by: Peter.C
Contributor
Posts: 56

Re: list all weekdays between 2 years

Thanks so much
Ask a Question
Discussion stats
  • 2 replies
  • 107 views
  • 0 likes
  • 2 in conversation