Search Postgresql Archives

Re: unexpected character used as group separator by to_char

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 9, 2021 at 1:28 PM Vincent Veyron <vv.lists@xxxxxxxxxx> wrote:
For the record below, I wish to display 'credit' properly formated in an html form, using to_char(credit, 'FM999G990D00')
                                                                               ^^^^^^^^^^^^^                   ^^^^^^^^^^^^
What can I do to get a standard space as group separator for my numbers?

By using "G" you are giving up control and letting your locale settings decide what gets output.  You can continue to use to_char but take control back by being explicit, or pass actual numbers into and out of the database and let your front-end deal with presentation concerns.  I suggest the latter.

David J.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux