Data Conversion

T

Tony Ramirez

I have a field in a table that lists data as "7.50 Inches", "7.75 Inches"
etc..etc. I want to convert this data to numeric. How would I do this...just
the code...I would probably do this within a query. Thanks so much.
 
K

KARL DEWEY

Try this --
Val([YourField])
Assumming all measurements are in inches and none are in feet, yards, rods,
etc.
 
J

Jim Bunton

wow - thought val looked REALLY intelligent until I tried Val("6.5
anything")

so then I didn't bother trying val("6.5 inches") > val("6.5 Cms")

but I'd never have thought it would have coped with any text other than
numeric

so good piece of info Karl!

Jim Bunton

KARL DEWEY said:
Try this --
Val([YourField])
Assumming all measurements are in inches and none are in feet, yards,
rods,
etc.
--
KARL DEWEY
Build a little - Test a little


Tony Ramirez said:
I have a field in a table that lists data as "7.50 Inches", "7.75 Inches"
etc..etc. I want to convert this data to numeric. How would I do
this...just
the code...I would probably do this within a query. Thanks so much.
 
J

John W. Vinson

wow - thought val looked REALLY intelligent until I tried Val("6.5
anything")

so then I didn't bother trying val("6.5 inches") > val("6.5 Cms")

but I'd never have thought it would have coped with any text other than
numeric

Well, it does have some limits: Val("About 5.5 inches") will return 0, since
it immediately gives up if it encounters text that cannot be interpreted as a
number. And Val("3E5ABC") will return 300000 rather than the 3 you might
expect.
 
Top