0
Hello, it should be something easy, but I’m cracking my head to solve.
I have a string, String(ValorTotal).replace("." , ""); //tira ponto
This string returns me the following value: 23600000000000004
What I need is to remove these numbers 0000000000004
and leave only the 2360
.
If anyone knows, help me!
What is the rule for separation? Do you want only the first 4 numbers? or all numbers before X zeros followed? or the whole part of a number? Explain it better so we can help.
– Sergio
What is the original value of
ValorTotal
?– Valdeir Psr
@Sergio just want the first 4 numbers.
– user81560
@Valdeirpsr would be this, var Total value = Valordis + Valordur, which would be the distance value plus the duration value.
– user81560