|
Try computing the last day of the month using the INTNX function with a zero
value and the optional fourth
argument.
MnthEnd= INTNX('Month', date,0,'E');
for example:
DATA ;
INPUT DATE DATE7.;
MNTHEND=INTNX('MONTH',DATE,0,'E');
put date=date7. mnthend=date7.;
DATALINES;
02FEB97
02FEB96
21DEC95
;
yields
DATE=02FEB97 MNTHEND=28FEB97
DATE=02FEB96 MNTHEND=29FEB96
DATE=21DEC95 MNTHEND=31DEC95.
Choi Ji-hee <jhchoi@CHAOS.DNI.CO.KR> wrote in article
<9703050509.AA13074@chaos.dni.co.kr>...
> Dear SAS users~
>
> I have a data including the variable in date format and want to know
> the ending day of month(31,30,28, etc) - the ending day in Febrary is
> not same by year, you know.
>
> If you know about the function that return the ending day of month
> or other method to find it then let me know please.
>
> Thanks in advance.
>
|