You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A expressão tonumber esta se comportando de forma incorreta exemplo:
tonumber('11.750,80|d') // => 11.750
O correto seria 11750.80
Também não existe forma de mudar a precisão de casas decimais e tem problema para formatos diferentes de valores por exemplo valores brasileiro ou americano.
Talvez uma forma interessante de utilização seria assim:
tonumber('VALOR|PRECISAO|FORMATO')
tonumber('1234.123.123,56|f:2|BRL')
VALOR: 11.760,00
PRECISAO: f:2
FORMATO: BRL
The text was updated successfully, but these errors were encountered:
A expressão tonumber esta se comportando de forma incorreta exemplo:
O correto seria 11750.80
Também não existe forma de mudar a precisão de casas decimais e tem problema para formatos diferentes de valores por exemplo valores brasileiro ou americano.
Talvez uma forma interessante de utilização seria assim:
tonumber('VALOR|PRECISAO|FORMATO')
VALOR: 11.760,00
PRECISAO: f:2
FORMATO: BRL
The text was updated successfully, but these errors were encountered: