How to change the decimal separator of DecimalFormat from comma to dot/point?

I have this little crazy method that converts BigDecimal values into nice and readable Strings.

private String formatBigDecimal(BigDecimal bd){
    DecimalFormat df = new DecimalFormat();
    return df.format(bd);

It however, also produces a so called grouping separator "," that makes all my values come out like this:


I do need the separator to be a dot or a point and not a comma.
Does anybody have a clue of how to accomplish this little feat?

I have read this and in particular this to death now but I cannot find a way to get this done.
Am I approaching this the wrong way? Is there a much more elegant way of doing this? Maybe even a solution that accounts for different local number representations, since the comma would be perfect by European standards.

8 Answers

Leave a Comment