Managing Project Currency Digits
Overview
Currency digits define the number of decimal places used for monetary values in a project.
For example:
- 0 →
$123
(no decimals) - 2 →
$123.45
(two decimals, common for most currencies) - 3 →
$123.456
(rare, but used in some contexts like precious metals pricing)
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:
- From the Tools menu, select Options.
- Go to the View tab.
- In the Currency section, review the Digits after decimal setting.
Currency digits 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
- ✅ Use 2 digits for most currencies (USD, EUR, GBP, etc.).
- ✅ Use 0 digits for currencies without minor units (e.g., Japanese Yen).
- ✅ Match the currency digits to your CurrencyCode setting for consistency.
- ❌ Avoid changing currency digits mid-project without updating all related cost data.
Related API Members
CurrencyCode
— The three-letter ISO 4217 currency code.CurrencySymbol
— The symbol used for currency display.CurrencySymbolPosition
— Placement of the currency symbol relative to the number.
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
- Currency digits control how many decimal places are shown for currency values.
- You can view them in Microsoft Project UI or get/set them programmatically with Aspose.Tasks.
- Always align your currency digits with your currency code and reporting needs to maintain consistency.