Jump to content

Decimalformat does not work with locale


dunham

Recommended Posts

Number input: 10000.1654687 -> Trying to get swiss number

thousand seperator = ' (single quote)

decimal seperator = , (comma)

 

Decimals do not work (thousand sep do) -> new DecimalFormat("#,##0.#").getInstance($P{REPORT_LOCALE}).format(10000.1654687) -> 10'000.165

Decimals do not work (thousand sep do) -> new DecimalFormat("#,##0.").getInstance($P{REPORT_LOCALE}).format(10000.1654687) -> 10'000.165

Works but without proper locale ??? -> new DecimalFormat("#,##0.#").format(10000.1654687) -> 10,000.2

When I just print $P{REPORT_LOCALE} -> de_CH

What's the problem here?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...