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
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.