Date: Tue, 13 Jul 2004 15:50:58 0400
ReplyTo: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SASL@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/cgibin/wa?A2=ind0305A&L=sasl&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??
