I'm looking to format a float so that it will be displayed in the following way:
999.999.990,00
I'm currently using the to_char
function:
to_char(SUM(amount::float)/100, '999G999G990D00')
However this format is showing commas instead of dots. Such is the standard in Germany.
When I changed the G
(used to symbolize a comma) to a D
(used to symbolize a dot) I get the following error:
psycopg2.ProgrammingError: multiple decimal points
I'm running PostgreSQL and Psycopg2 with Python 2.7.
Any ideas how I can accomplish this replace?
Thanks
You can try the following
It should give you the following results