LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 1997, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 5 Mar 1997 06:29:07 GMT
Reply-To:   Andrew James Llwellyn Cary <ajlcary@IX.NETCOM.COM>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Andrew James Llwellyn Cary <ajlcary@IX.NETCOM.COM>
Organization:   Cary Consulting Services
Subject:   Re: [Q] SAS Functions

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. >


Back to: Top of message | Previous page | Main SAS-L page