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
The Boston Area SAS Users Group (BASUG) is hosting an in person Meeting & Training on June 27!
Full details and registration info at https://www.basug.org/events.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 452 views
  • 0 likes
  • 2 in conversation
OSZAR »