### Post

2 followers Follow

# How convert currency value to number?

I want round some calculated value and i have problem with conversation currency to number. How to do it?

This is an example of formula which i build:

Round(ToNumber(ToString(\$TimeTrackingCost-(\$TotalEstimatedCost*\$PercentCompleted/100))),1)

Now i get following error:

{Round(ToNumber(ToString(\$TotalEstimatedCost*\$PercentCompleted/100)),1)}: Argument 'value' to function 'ToNumber' has value '19428.5714285792 PLN' which is not convertible to numeric

Hi Krzysztof,

That is a great question! This is more of a customization question so I went ahead and moved this question to our Customization section of the forum.

Hi Krzysztof,

Cost fields are currency fields. If you want to perform Round function on them you need to convert them into their numeric value. The trick is to use VALUE/currency(1). In that case, it should look something like this: Round((\$TimeTrackingCost-(\$TotalEstimatedCost*\$PercentCompleted/100))/Currency(1),1)

If you want to convert is back to a currency field do the opposite or apply Currency function on the result: Currency(result)

Please let me know if it is working as expected.

Regards and happy holidays!

Tamir