# Keep if X.12 or X.123 leave as is, no rounding

Hi,

I have been looking around for about an hour now and can not seem to find this exact question.

I have data from an XML file and sometimes the Price field has two digits after the decimal and sometimes 3

so most are 1.12 but now and then some are 1.123

I need to just keep them as is however no matter what I have tried so far the data gets either rounded or truncated.

I have tried ToText... no help

Any Ideas?

##### Tim Riley replied

I found a way to do it in a formula:

If mid(mid(ToText"({Order.Price},3),InStr(ToText({Order.Price},3),".")+1,4),3,1) = "0" then

"$" + ToText({Order.Price},2)

Esle

"$" + ToText({Order.Price},3)

I was not able to Cut and paste the formula directly in here... I don't know why... so I had to type in the above. Sorry If there is a typo.

Thx

Tim