LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 14 Jul 2004 13:23:25 -0400
Reply-To:     Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:      Re: How to return integer/fractional value in SAS??
Comments: To: Julie <wardnine@HOTMAIL.COM>
Content-Type: text/plain

Julie: I find it surprising that no one recommended the MOD() function: data test; x=4.7; /* integer part of x. */ y=int(x); /* fractional part of unit in x. */ z=mod(x,1); put x= y= z= ; run; Sig -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Julie Sent: Monday, July 12, 2004 5:53 PM To: SAS-L@LISTSERV.UGA.EDU Subject: How to return integer/fractional value in SAS??

Simply looking for the way to return the integer or fractional part of a given number? For example, in Excel, int() gives you the integer part for a given number. If I have the number 4.7, How can I have the '4' or the '.7' returned? Are there functions in SAS for this??


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