Managing Project Currency Digits

Overview

Currency digits define the number of decimal places used for monetary values in a project.
For example:

Setting the correct number of currency digits ensures that cost data is displayed consistently across reports, exports, and integrations.

Currency digits set the number of decimal points (digits after a decimal point) used for currency.

Managing Currency Digits

The CurrencyDigits property exposed by the Project class is used to set or get the number of digits after the decimal symbol for a project’s currency. This property supports the integer data type.

To check the number of decimal places for currency in Microsoft Project:

  1. From the Tools menu, select Options.
  2. Go to the View tab.
  3. In the Currency section, review the Digits after decimal setting.

Currency digits in Microsoft Project

altering currency symbol in Microsoft Project Figure: Currency digit setting in Microsoft Project.

Working with Currency Digits in Aspose.Tasks

The CurrencyDigits property of the Project class is used to get or set the number of digits after the decimal symbol for a project’s currency.
It accepts an integer value from 0 to 4 in Microsoft Project.

Setting Currency Digits using Aspose.Tasks

Below is a complete working example that creates a new project and sets the currency digits to 2:

1// Create new project and set currency digits
2Project project = new Project();
3project.Set(Prj.CurrencyDigits, 2);

Getting Currency Digits using Aspose.Tasks

The currency properties are accessed through the project’s CurrencyDigits property.

1Project project = new Project("New Project.mpp");
2Console.WriteLine(project.Get(Prj.CurrencyDigits));

Best Practices

FAQ

Q: What happens if I set currency digits to a value higher than 4?
A: Microsoft Project supports up to 4 digits after the decimal; higher values are ignored.

Q: Does changing currency digits affect stored numeric values?
A: No, it changes only how the numbers are displayed, not the internal calculation precision.

Summary

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.