Jump to content

little udf for converting numbers

Recommended Posts

ok i just made a little udf for that "problem"

here it is:

$a = random (1, 100)
$b = DOT2COMMA($a)
msgbox (0, $a, $b)

Func DOT2COMMA($number)
    Case StringInStr ($number, ".")
        $number = StringReplace ($number, ".", ",")
        Return $number
    Case StringInStr ($number, ",")
        $number = StringReplace ($number, ",", ".")
        Return $number

+ a little demo

works fine here


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...