How to calculate only bussiness days
How to calculate only bussiness days
(OP)
Hi !
I have following code
new_sasdate = input(osjomtpv,yymmdd8.);
-----------------
if new_sasdate - today() <= 5 then osinko ="DIVIDEND" ;
TEST=new_sasdate - today();
if TEST < 0 then osinko ="" ;
This calculate also Saturday and Sunday but I don't want that ?
Thanks for any help !
I have following code
new_sasdate = input(osjomtpv,yymmdd8.);
-----------------
if new_sasdate - today() <= 5 then osinko ="DIVIDEND" ;
TEST=new_sasdate - today();
if TEST < 0 then osinko ="" ;
This calculate also Saturday and Sunday but I don't want that ?
Thanks for any help !
RE: How to calculate only bussiness days
Maybe something like...
new_sasdate = input(osjomtpv,yymmdd8.);
if new_sasdate - today() <= 5 then osinko ="DIVIDEND";
else
if weekday(new_sasdate) = 1 then osinko ="";
else
if weekday(new_sasdate) = 7 then osinko ="";
TEST=new_sasdate - today();
if TEST < 0 then osinko ="" ;
RE: How to calculate only bussiness days
It must work like this !
Today is example Wednesday 6.4 and the new_sasdate = 12.4 so the test day (new_sasdate - today())should be 3 !?
Br
Timo