Skip to main content
Participant
May 22, 2017
Question

10493.3333333 need to round to nearest dollar amount if at $0.50 needs to round up anything less round down

  • May 22, 2017
  • 2 replies
  • 297 views

10493.3333333 need to round to nearest dollar amount if at $0.50 needs to round up anything less round down

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
May 22, 2017

Did you try Math.round()?

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Inspiring
May 22, 2017

Have you tried setting the number of decimal places for the field so the value displays as whole dollars only?

Note the above does not change the value of the field. To change the value  of the field, you will need to round the computed value of the field in your calculation. The value of the field and not the displayed value is used in subsequent calculations.