Announcement

Collapse
No announcement yet.

Use ',' or '.' as decimal separator

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use ',' or '.' as decimal separator

    Hi all,

    There are some way to number fields accept either ',' or '.' as decimal separators?

    Normally in Spain is used ',' to separate decimals but using '.' key from block num, and don't works (I suppose because '.' from block num is a '.' not a ',')

    Some suggestions to accept both?

    Regards.
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

  • #2
    Afaik, you cannot as these symbols are used in string number_format ( float $number , int $decimals = 0 , string $dec_point = "." , string $thousands_sep = "," )

    You can accept the value as string though and then do a change of , to . or the other way around before converting it to number.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Originally posted by aducom View Post
      Afaik, you cannot as these symbols are used in string number_format ( float $number , int $decimals = 0 , string $dec_point = "." , string $thousands_sep = "," )

      You can accept the value as string though and then do a change of , to . or the other way around before converting it to number.
      Maybe is something more related to regional settings on O.S. I will check for this
      /Giuseppe

      Professional Scriptcase Services
      Some Customers opinions

      Comment


      • #4
        a Dynamic mask setting for SC would be nice.. maybe with globals.

        well just saying =P.

        Regards

        Comment


        • #5
          As an alternative, you could get Spain to change.

          Just kidding using my ScriptCase sense of humor.
          Dave Prue
          Code Whisperer
          Lahar International Corp
          www.lahar.net

          Comment

          Working...
          X