How to format negative currency values (remove () )?. | Community
Skip to main content
Level 3
February 28, 2014
Solved

How to format negative currency values (remove () )?.

  • February 28, 2014
  • 6 replies
  • 5505 views

Hi, I have a field that ocasionally can contain negative raw values.

What happens is, when a negative raw value is fed to the field, the field looks like this:

($999.999,00)

And I'd like it to look like this:

-$999.999,0

Any ideas how to do this?, I couldn't find any option in the patterns section.

Thanks!.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by LittlePenguin

Alright, I fixed it removing the num.currency{} formatting, and I replaced it for num{$zzz,zzz,zzz,zzz,zzz,zz9.99}

It seems like the () enclosing the number produces negative signs to dissapear.

6 replies

Level 2
February 28, 2014

Try placing S before the $ in the pattern:



num{S$z,zzz,zz9.99}

Cheers

Level 9
February 28, 2014

If you use num{$zzz,zzz,zz9.99} as your display pattern you will get the negative sign after the dollar sign:

$-999 999,00

Commas, periods and spaces are put in depending on the locale you choose. The example above is French(Canada). I'm not sure what locale would use periods to separate thousands.

Kyle

Level 3
February 28, 2014

I don't have a num{S$z,zzz,zz9.99} I have this: num.currency{}

Level 2
February 28, 2014

Placing a capital S before the $ will result in a negative sign appearing before the $ symbol  as  desired.

Level 3
February 28, 2014

Well, that doen't happen, I see ($999.999,00).

My local es Spanish Argentina.

LittlePenguinAuthorAccepted solution
Level 3
February 28, 2014

Alright, I fixed it removing the num.currency{} formatting, and I replaced it for num{$zzz,zzz,zzz,zzz,zzz,zz9.99}

It seems like the () enclosing the number produces negative signs to dissapear.