Re: Arrrr... date formatting.

From: Lugovoi Nikolai <meadow(dot)nnick(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Arrrr... date formatting.
Date: 2005-09-19 15:45:09
Message-ID: dgmmah$jb4$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alex Turner wrote:
> Shiver me timbers, whats up with to_char()?!
>
> Avast! Is there no way to get a month without it being padded to nine
> characters? It makes using a database to actualy format a date for
> output kinda impossible?
>
> I'll have to walk the plank if I can't get an answer, the crew will
> mutiny and leave me on an island with a one-shot pistol and the sight of
> me sails dissapearing over the horizon!
>
> Alex Turner
> NetEconomist
> P.S. For those who didn't know - it's national talk like a pirate day.
select length(to_char('2005-Jun-10'::timestamp without time zone,
'FMMonth')); -> 4

Manual:
9.8. Data Type Formatting Functions
Table 9-22. Template Pattern Modifiers for Date/Time Formatting
Modifier Description Example
FM prefix fill mode (suppress padding blanks and zeroes) FMMonth

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc Munro 2005-09-19 15:48:20 Re: pg_ctl reload breaks our client
Previous Message Reid Thompson 2005-09-19 15:37:07 Re: Arrrr... date formatting.