Hi,

I just want to stop crazy people inputting junk and causing cf\sql errors.

For this specific case though I am allowing users to search on a monetary 
amount, but want to remove the currency formatting from user input ( yes I 
guess  LSParseCurrency will do this) but also remove at this same time any 
unexpected characters from the string that crop up from time to time (typos do 
happen).

Currently  LSParseCurrency will cause an error if the string is not already in 
a format that it thinks is a monetary amount.




>>> "Barry Beattie" <[EMAIL PROTECTED]> 09/07/2008 2:35 pm >>>

@Scott

Zac has the correct/official way of doing what you want:

from livedocs on LSParseCurrency:

"Converts a locale-specific currency string into a formatted number.
Attempts conversion by comparing the string with each the three
supported currency formats (none, local, international) and using the
first that matches."


what you do is correct - for your locale - but

europeans do wierd stuff with thousands seperators and decimal places.
you say which locale you're working in and LSParseCurrency adjusts to
exactly what you want.

eh my 2c, learnt from bitter experience.
barry.b




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to