Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
May 22, 2017 May 22, 2017

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

TOPICS
Acrobat SDK and JavaScript , Windows
271
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2017 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 22, 2017 May 22, 2017
LATEST

Did you try Math.round()?

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines