These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Truncate a Value

buffalogal42
Registered: May 15 2008
Posts: 2

I just got this program and need to make a form that calculates some fields. I watched a tutorial and got the FormCalc to do everything I want, but I am wondering if there is a way to make a returned value truncate at a set number of digits (like you can in Excel) rather than round up. For example, if my value is 45.5788 and I want it to display to two decimals, it rounds to 45.58 when I want it to show 45.57.

Got any tips for a newbie?

Thanks!

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can create a function using the ""Floor(x)" and the "Pow(s, y)"functions of FormCalc and multiplication and division to truncate to a given integer and convert back the required number of decimals.

George Kaiser