Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Characters to numeric 1

Status
Not open for further replies.

awise

IS-IT--Management
Dec 11, 2001
85
Is there a function that will convert the values in a character type field to a numeric value?

I have a field that's char (21), however, the data in the field is actually sales numbers. I want to convert the values to numeric.

ex: char 35.800000 to numeric 35.80

Thanks,

zaw
 
Dear Awise,

You can use the tonumber function. It is probably a good idea to test it first as in:

If isnumeric({Table.Field})
then tonumber({Table.Field})
else 0

regards,

ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top