This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<fmt:formatNumber question

 
Tony Evans
Ranch Hand
Posts: 597
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to format numbers so if I get 6664,4000 I will return 6664.4000
if i get 6664,4000,230 I will return 66644000.230

As I understand it I use fmt:formatNumber var="levelAmt" value="${value.levelAmount}" pattern="Some pattern"/>

But I cant find any link that goes into the pattern, what patterns mean, what is the difference say between 0.000 an 0.0##.

Thanks for any help or any helpful links.

Thanks Tony
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
 
Tony Evans
Ranch Hand
Posts: 597
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear Bibeault the nature of the software looking at a jsp fix before changing the code, is it possible to do this using <fmt:formatNumber with the correct pattern, is there a link with a good explantion of using patterns

Thanks Tony>
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The patterns are described in the javadoc that I linked to. The numberFormat tag uses DecimalFormat under the covers.
 
Tony Evans
Ranch Hand
Posts: 597
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear Bibeault I think I have been given a impossible task given the number 6664,4000 it will convert it to 66644000.00 not 6664.4000 dealing with German an NL currency.

I am using mso-number-format is there anything you can add to a pattern to say its german so dont treat , as a decimal thousand.

Thanks for any help

Tony

 
Sai Hegde
security forum advocate
Ranch Hand
Posts: 205
1
Android Flex Google App Engine
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shouldn't the pattern #.00 be what you need?
 
Tony Evans
Ranch Hand
Posts: 597
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replys I found a soultion use mso



 
Sai Hegde
security forum advocate
Ranch Hand
Posts: 205
1
Android Flex Google App Engine
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great.. and you thought it was impossible
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic