0
I have a system that calculates the average of the fields and then executes the javascript below, only the result comes out like this 0.222048 and the correct would be 222.048, how to do this conversion?
<script>
function calcularMediam3etes() {
var m1 = document.forms['formMediasETEs']['mediaQ_lsE'].value;
var mqm3 = (m1 * 86.400)/1000;
document.forms['formMediasETEs']['mediaQm3E'].value = mqm3;
}
</script>
Thank you!
You’ve tried not splitting by a thousand?
– Sergio
The problem is that the calculation has to be divided by a thousand, the formula is N * 86.400 / 1000. With this calculation we discovered the daily flow per cubic meter, there is no way to take. ;(
– Quito Gaspar
If the formula is correct, why would the result be wrong? I imagine that the division per thousand makes the resulting number have as unit the cubic meter. Without the division the unit would be liters. Pra min seems a matter of converting between units of measures. Based on the example you gave.
– Juven_v
Because the result comes out like this 0.222048 and the correct would be 222.048, in excel, calculator or any other comes out normal.. only in the code that comes out of the format I need. Have any ideas to help? I already took the division / 1000, but tb not solved because of the point of the decimal places.
– Quito Gaspar
Maybe the result is then supposed to come out in dm cubico
– Miguel