| Date: | Tue, 26 Aug 2003 12:38:28 -0400 |
| Reply-To: | Robert Abelson <rabelson@KAI-RESEARCH.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Robert Abelson <rabelson@KAI-RESEARCH.COM> |
| Subject: | Re: converting string (spaces) to numeric |
| Content-Type: | text/plain |
|---|
Alvin,
You can use the COMPRESS function to remove the blanks.
number = input(compress(string),7.);
Hope this helps.
Bob Abelson
KAI Research, Inc.
6001 Montrose Rd.
Suite 920
Rockville, MD 20852
T: 301-770-2730
F: 301-770-4183
rabelson@kai-research.com
> -----Original Message-----
> From: Alvin Igonia [SMTP:aigonia@CA.IBM.COM]
> Sent: Tuesday, August 26, 2003 12:22 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: converting string (spaces) to numeric
>
> Has anyone ever converted a string to numeric (ie. '1 000 000' to
> 1000000).
>
> I have a program I am trying to modify. The data has change. We use to
> read the data string without any spaces but now it contains spaces.
>
> I don't really want to do a do-loop and check for spaces but if it's the
> only way, i guess i will have to.
|