How can I get the JSTL fmt tag to format negative numbers with ()? For example, if I have -20, it would show (20). Positive numbers would be normal.
Asked
Active
Viewed 1,351 times
2 Answers
0
I was trying to use pattern to do this, but if you use type="currency" you get the parens
<fmt:formatNumber type="currency" value="${line.volume}" />

E Paiz
- 661
- 4
- 9
- 19
0
You haven't shown what patterns you tried, but I would expect something like:
"#;(#)"
would work...

kschneid
- 5,626
- 23
- 31