3 Replies Latest reply on May 23, 2008 12:32 PM by SiriK

    Show two decimals, but not round it

    SiriK
      I'm using AcroForms to do calculations and have one field that has me completely frustrated. It pulls the value from FieldA (this field does a Simple Calculate sum and truncates using Math.floor).

      FieldB uses this calculation script to divide by 12:

      var f = this.getField("FieldA");
      event.value = f.value /12;
      if(event.value == 0) event.value = "";

      I want the decimal place to have 2 numerals, but not round and Acrobat assumes that if the Format is two decimals, that it needs to round. Does anyone know how to show two decimals, but not round it?

      Example:
      FieldA = 350.00
      FieldB = 29.166666667

      FieldB currently = 29.17
      FieldB needs to = 29.16

      Thanks for any advice or help!

      Siri