Well anyways, trying to figure out how to properly trim out US currency. I want to take out the $ and the , comma so that I can have my calculation work properly and not to have an error message about my string value.
noob question on trim function with dollarformat function
Collapse
X
-
If I understand your question right, simply don't use DollarFormat(). DollarFormat is a function that takes a raw integer or floating point value and puts in all the stuff you want to remove.Originally posted by RDpinoyWell anyways, trying to figure out how to properly trim out US currency. I want to take out the $ and the , comma so that I can have my calculation work properly and not to have an error message about my string value.
If I misinterprited your question you can use a regular expressing:
[PHP]<cfset strippedamt=RER eplace(amt,"[^0-9.\-]","","ALL") >[/PHP]
Comment