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:         Tue, 13 Jul 2004 15:50:58 -0400
Reply-To:     Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject:      Re: How to return integer/fractional value in SAS??

Indeed, beware of negative arguments, and beware of relying on Excel as a model.

SAS has INT, FLOOR, and CEIL functions. Excel has INT, FLOOR, and CEIL functions. They behave differently with negative arguments. See

http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0305A&L=sas-l&P=R30525

On Mon, 12 Jul 2004 16:04:02 -0600, Jack Hamilton <JackHamilton@FIRSTHEALTH.COM> wrote:

>Yes, SAS has functions for this. You can find them in the web >documentation under "Functions by category", ><http://v8doc.sas.com/sashtml/lgref/z0245860.htm>. > >The function to get the integer portion of a SAS value is INT(). You >can obtain the floating point portion of a number with ABS(NUMBER) - >INT(ABS(NUMBER)). > > >-- >JackHamilton@FirstHealth.com >Manager, Technical Development >Metrics Department, First Health >West Sacramento, California USA > >>>> Julie <wardnine@HOTMAIL.COM> 07/12/2004 2:52 PM >>> >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