• Post Reply Bookmark Topic Watch Topic
  • New Topic

Number formatting  RSS feed

 
Christie George
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

my issue is like this:
my application should display numbers the way its in the DB, upto 6 decimal places,if the value is 1.2 it should display only 1.2 and not 1.200000, if its 1.22 it should display 1.22 and not 1.220000. this goes on till 6 deciamal places.

i am not sure wether its a java or a java script issue.
please help
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it's java, use java.text.DecimalFormat class



The o/p
100.8
100.89
100.892
100.8923
100.89234
100.892345

tx,
ram.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!