BookmarkSubscribeRSS Feed
ywon111
Quartz | Level 8

Looks like it is throwing the end of June quarter. How do I get other quarter? Eg. March, December?

3 REPLIES 3
ballardw
Super User

Example input data? Example code? Example output?

 

The documentation for the MONTHw. format does not show a decimal component and would display the month number of a date value.

Example displaying the month a date. Nothing to do with quarters.

61   data example;
62      x = '15Jun2021'd;
63      put x=date9. 'Month number: ' x=month12.7;
64   run;

x=15JUN2021 Month number: x=6
Ksharp
Super User

It seems you are talking about INTNX() .

 

data _null_;
today=date();
start_july1=intnx('month12.7',today,0,'e');
start_july2=intnx('year.7',today,0,'e');

put today=  yymmdd10.  start_july1= yymmdd10.  start_july2=  yymmdd10. ;
run;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3 replies
  • 806 views
  • 0 likes
  • 4 in conversation