How to format negative currency values (remove () )?. | Adobe Higher Education
Skip to main content
Level 3
February 28, 2014
解決済み

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

  • February 28, 2014
  • 6 の返信
  • 5512 ビュー

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!.

このトピックへの返信は締め切られました。
ベストアンサー 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 の返信

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

LittlePenguin作成者
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.

LittlePenguin作成者
Level 3
February 28, 2014

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

My local es Spanish Argentina.

LittlePenguin作成者回答
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.