Re: function to format floats as money? (removing space padding)
В списке pgsql-sql по дате отправления:
| От | Mark Stosberg |
|---|---|
| Тема | Re: function to format floats as money? (removing space padding) |
| Дата | |
| Msg-id | 3ADF4218.6604D76C@summersault.com обсуждение исходный текст |
| Ответ на | Re: function to format floats as money? (Peter Eisentraut <peter_e@gmx.net>) |
| Ответы |
Re: function to format floats as money? (removing space padding)
|
| Список | pgsql-sql |
Now that I've figured out that numeric is good for storing money, and that I can format with like this: to_char(price, '9,999,999.99') as price Then I discovered that sometimes this returns leading spaces I don't want. I can get rid of them like this: trim(to_char(price, '9,999,999.99')) as price Is that the recommended money formatting style, for amounts less than 9,999,999.99? (assuming I'll tack on my own currency symbol? ). Other there other general styles that folks like for this? Thanks, -mark personal website } Summersault Website Development http://mark.stosberg.com/ { http://www.summersault.com/
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера