STring to numeric

STring to numeric

Post by Philip Feel » Fri, 01 Aug 2003 00:34:30



Is it possible to take part of a string that's numerica and create a new
variable out of it that is numeric?

I was thinking of a combination of the concat and ltrim commands?

Any suggestions?

Thanks,
Phil

 
 
 

STring to numeric

Post by Rich Ulric » Fri, 01 Aug 2003 01:01:22




Quote:> Is it possible to take part of a string that's numerica and create a new
> variable out of it that is numeric?

How about,
Recode ...   INTO  ...   ?

How about,
compute Num = number(string1, format1) .

Quote:> I was thinking of a combination of the concat and ltrim commands?

Maybe I don't understand you question because I don't
see any use  for 'concat' or  'ltrim'.  Oh, maybe you have
to ignore some parts with letters?  

Examples?

--

http://www.pitt.edu/~wpilib/index.html
"Taxes are the price we pay for civilization."  Justice Holmes.

 
 
 

1. Converting strings to numeric

Another way:
ShouldBe = 12.48
WebResult $12.48

Webresult= "$12.48";
#  money gets $12.48 from Excel
rc = substr(money,2);
# rc now has everything from 2nd character on.
pause(rc);
 # this contains 12.48

------------------
Ainsley Lee
QA Engineer

Please click the following link to reply:
http://www.qaforums.com/Forum4/HTML/001460.html

2. GDM-20D10 and SS5

3. Ethernet Games

4. convert string to numeric

5. Communication Networks Class Library 0.15

6. N. NJ - FREE Atari 8-bit and ST

7. convert very large string to numeric

8. Help converting string to numeric

9. Help converting string to numeric without losing data

10. Convert from string to numeric

11. string to numeric