Take a look at the replace functions, then on your incoming
string do a search and replace on the common things like $
and . and replace them with "" that will leave you with just
raw numbers and you can then number format them later on
output.  So look at replace() functions and numberformat()
functions.

HTH
Bill

> -----Original Message-----
> From: Mike Kear [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 21, 2001 7:32 PM
> To: CF-Talk
> Subject: How to Convert currency to numeric value
>
>
> I'm doing a calculator that involves users
> entering their annual income into
> an input field.  So the gross income needs to be
> a numeric value.
>
> But if the user types in $36000, then the
> val(grossincome) function returns
> zero, because the first character isn't numeric.
>
> What's the easiest way to get the number out of
> an answer like that?
>
> Cheers,
> Mike Kear
> Windsor, NSW, Australia
> AFP WebWorks
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to