noob question on trim function with dollarformat function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RDpinoy
    New Member
    • Feb 2008
    • 1

    noob question on trim function with dollarformat function

    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.
  • Shift4SMS
    New Member
    • Feb 2007
    • 14

    #2
    Originally posted by RDpinoy
    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.
    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.

    If I misinterprited your question you can use a regular expressing:

    [PHP]<cfset strippedamt=RER eplace(amt,"[^0-9.\-]","","ALL") >[/PHP]

    Comment

    Working...