Help using Base SAS procedures

first and last day of a month

Accepted Solution Solved
Reply
Super Contributor
Super Contributor
Posts: 440
Accepted Solution

first and last day of a month

hi guys,

how do i get the first and last days of let's say last month or June. What would be the code/query to do that?

Thanks,

Tal


Accepted Solutions
Solution
‎08-13-2015 03:35 PM
Regular Contributor
Posts: 156

Re: first and last day of a month

data _null_;
 
x=intnx("month",today(),0);
  y=intnx("month",today(),1)-1;
 
format x y mmddyy10.;
 
put x= y=;
run;

View solution in original post


All Replies
Solution
‎08-13-2015 03:35 PM
Regular Contributor
Posts: 156

Re: first and last day of a month

data _null_;
 
x=intnx("month",today(),0);
  y=intnx("month",today(),1)-1;
 
format x y mmddyy10.;
 
put x= y=;
run;
Super Contributor
Super Contributor
Posts: 440

Re: first and last day of a month

Thanks Phil Smiley Happy

Frequent Contributor
Posts: 130

Re: first and last day of a month

Similar to PhilC's, although it's in a macro form:

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 284 views
  • 4 likes
  • 3 in conversation