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 (April 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 20 Apr 2006 22:59:05 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: Truncate numerical variables
Comments: To: zhumin80@GMAIL.COM
In-Reply-To:  <1145572958.724151.54040@i39g2000cwa.googlegroups.com>
Content-Type: text/plain; format=flowed

Mindy ,

Num = input( substr( put( <Var Name> , 8. -L ) , 1 , 3 ) , 8. ) ;

Toby Dunn

From: Mindy <zhumin80@GMAIL.COM> Reply-To: Mindy <zhumin80@GMAIL.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Truncate numerical variables Date: Thu, 20 Apr 2006 15:42:38 -0700

Hi, all,

I have some numerical variables, i.e. 1000 2000 30000 4000 Now I only want the first three digits of these numerical variables,i.e. 100 200 300 400 How can I do this in SAS? I only know function SUBSTR but it is for character variables.

Thank you,

Mindy


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