• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NumberFormat Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NumberFormat Question


  • Subject: NumberFormat Question
  • From: "Albert Jagnow" <email@hidden>
  • Date: Thu, 27 Jan 2005 10:08:34 -0600
  • Importance: normal
  • Priority: normal

This is kind of a silly picky question, but I am not sure how to get the number format to be consistent in one of my applications. I have an application that stores numerical data in a DB2/400 database in a Decimal field. I have a page which displays a calculation as a BigDecimal from the data in that column. The numberformat is set to "0.##" The result I expect is if the data is 0 to display 0, if it is 2 to display 2 and if it is 2.3333 to display 2.33. What I get is 0 for 0 , 2.33 for 2.3333, and the part that is wrong is 2.00 for 2. I don't want to display any zeros after the decimal point. If I enter new data it works correctly until the application reloads that data from the database. For whatever reason if the data is loaded from the database it thinks that the 0's after the decimal are significant, how do I get the formatter to ignore them and only display the decimal if it is not 0?

--Albert


This e-mail (including any attachments) is covered by the Electronic
Communications Privacy Act, 18 USC. 2510-2521. It is confidential and
may be legally privileged. If you are not the intended recipient, you
are hereby notified that any retention, dissemination, distribution, or
copying of this communication is strictly prohibited. Please reply to
the sender that you have received the message in error, and then delete
it. Thank you. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: NumberFormat Question
      • From: LD <email@hidden>
  • Prev by Date: Re: "Cron" a method
  • Next by Date: FetchSpecification with limit and display group
  • Previous by thread: Re: "Cron" a method
  • Next by thread: Re: NumberFormat Question
  • Index(es):
    • Date
    • Thread