77
78 data _null_;
79 x=intck('weekday17w', '01jan12'd, '31dec12'd);
80 y=intnx('weekday17w', '01jan12'd, 1);
81 put x= +1 y date.;
82 run;
x=261 02JAN12
NOTE: DATA statement used (Total process time):
real time 0.12 seconds
cpu time 0.00 seconds
Hi,
What is the output you are expecting...
data _null_;
x=intck('weekday17w', '01jan12'd, '31dec12'd);
y=intnx('weekday17w', '01jan12'd, 1);
put x= +1 y weekdate17.;
run;
Thanks,
Shiva
Thanks for reply,
Generally weekday17w interval should give the 5 day week with saturday and sunday as the weekends.
So the next interval should be next week in intnx function and total number of 5 day weeks in the year in intck function
But this is not happening in my point of view
Hi,
01Jan2012 is sunday.next day of weekday is monday which 02Jan2012,Your code is working correct right.
06Jan2012 is friday and its giving 09Jan2012 as weekday starts.
data _null_;
x=intck('weekday17w', '01jan12'd, '31dec12'd);
y=intnx('weekday17w', '01jan12'd, 1);
z=intnx('weekday17w', '06jan12'd, 1);
format y z date9.;
put (_all_) (=);
run;
x=261 y=02JAN2012 z=09JAN2012
Thanks,
Shiva
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.