By converting a string to a number, do you mean converting the string value
123 to 123, or do you mean converting one hundred twenty-three to 123?
If it's the first, you've got your answer already. If it's the second, it's
a bit more complex and something that has come up in the past. You can
I think you want the val() function
so val (123) would return 123
val(jeff) would return 0 (all non numerics return 0)
Hi All-
is there a way I can convert a string to number in coldfusion. I could
not see any related functions to do this?
Thanks
is there a way I can convert a string to number in coldfusion. I could not
see any related functions to do this?
ColdFusion is very loosely typed, so you don't need to convert a
string to a number. Just use it a numeric operation and it gets
treated as a number. Try it, it's fun!
Dave Watts,
: Dave Watts [mailto:dwa...@figleaf.com]
Sent: Monday, July 19, 2010 4:57 PM
To: cf-talk
Subject: Re: coverting string to a numeric value
is there a way I can convert a string to number in coldfusion. I could not
see any related functions to do this?
ColdFusion is very loosely typed, so you
/or. It must be .
Plug in to our blog: AW Unplugged
http://www.austin-williams.com/unplugged
-Original Message-
From: Robert Harrison [mailto:rob...@austin-williams.com]
Sent: Monday, July 19, 2010 5:04 PM
To: cf-talk
Subject: RE: coverting string to a numeric value
Depending on what you
...@austin-williams.com]
Sent: Monday, July 19, 2010 5:04 PM
To: cf-talk
Subject: RE: coverting string to a numeric value
Depending on what you are doing you may want to test the value first to
ensure it's a number. You can get hard errors in some cases for data type
mismatch... like in queries
6 matches
Mail list logo