Search Postgresql Archives

Re: to_char() Question

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

 



On Tue, Dec 13, 2005 at 11:30:36 -0500,
  Terry Lee Tucker <terry@xxxxxxxx> 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.


[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux