Re: to_char() Question

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: to_char() Question
Дата
Msg-id 20051214180938.GA20046@wolff.to
обсуждение исходный текст
Ответ на Re: to_char() Question  (Terry Lee Tucker <terry@esc1.com>)
Ответы Re: to_char() Question  (Terry Lee Tucker <terry@esc1.com>)
Список pgsql-general
On Tue, Dec 13, 2005 at 11:30:36 -0500,
  Terry Lee Tucker <terry@esc1.com> wrote:
>
> On Tuesday 13 December 2005 11:20 am, John Sidney-Woollett saith:
> > Not sure if there is a numeric formatting option that allows what you want.
> >
> > But how about?
> >
> > substr(to_char(1029, '9,999'),2)
>
> That's so simple, I'm embarrased ;o)
>
> Thanks for the help...

You can also us 'FM' to get rid of extra space. From the to_char docs:
FM suppresses leading zeroes and trailing blanks that would otherwise be added
to make the output of a pattern be fixed-width.

В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: Release 8.1.1 for Fedora X 64bits
Следующее
От: Terry Lee Tucker
Дата:
Сообщение: Re: to_char() Question