BookmarkSubscribeRSS Feed
sfffdg
Obsidian | Level 7

Hi ,

 

Just wondering if there is a way to achieve below using month6 interval.Basically trying other ways ..

 

data _null_;
date1=intnx('month','05may2022'd,6);
date2=intnx('month','05may2022'd,0);
days=date1-date2;
format date1 date2 date9.;
put date1 date2 days;
run;

 

Thanks,

Swathi

1 REPLY 1
Quentin
Super User

Not quite sure what you want, but you may be interested in exploring the optional alignment argument.  e.g.:

61   data _null_;
62   date1=intnx('month6','05may2022'd,1,'s');
63   date2=intnx('month6','05may2022'd,0,'s');
64   days=date1-date2;
65   format date1 date2 date9.;
66   put date1 date2 days;
67   run;

05NOV2022 05MAY2022 184
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 583 views
  • 0 likes
  • 2 in conversation