Start a new topic

Commas in NumberFormat?

According to the docs: 

  • Number formats
  • The lists for number and decimal number contain collections of standard formats. If these formats are not suitable, you can enter your own format in the appropriate field. The tokens used to define the format are listed in the right-click menu when the field has focus, and complete documentation for these tokens is available at the following web page: DecimalFormat.


First, I don't understand this.  Second, the linked java docs don't mention comma anywhere.  Is it possible to have commas in the number output?


Looks like maybe #,## will do it?  Testing.

Hi Scott,


I assume that you mean using comma as the decimal separator? If so, this is by default controlled by the locale. In the Decimal Format pattern, a period always represents the decimal separator but it is replaced with the current locale's separator character when formatting a number. For instance, with a Swedish locale a comma is used as the decimal separator, while a period is used for an English locale.


If you are using DbVisualizer 9.5.3 or later, you can override the locale defaults by setting the Decimal (and Grouping) separator separately.


Best Regards,

Hans

Login or Signup to post a comment