From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Huxton <dev@archonet.com>
Cc: Christopher Sawtell <csawtell@xtra.co.nz>
Cc: pgsql-sql@postgresql.org
Subject: Re: my pgsql error?
Date: Wed, 14 Mar 2001 09:49:51 -0500
Message-ID: <24923.984581391@sss.pgh.pa.us> (raw)
In-Reply-To: <20010314095433.E00372A683@mainbox.archonet.com>
References: <20010314095433.E00372A683@mainbox.archonet.com>
> For a moment I thought you could do to_char(now(),'Day DD Month YYYY'
> but you're quite right you need to rtrim() the various pieces.
regression=# select to_char(now()-10,'Day DD Month YYYY');
to_char
-----------------------------
Sunday 04 March 2001
(1 row)
regression=# select to_char(now()-10,'fmDay fmDD fmMonth YYYY');
to_char
---------------------
Sunday 4 March 2001
(1 row)
The 'fm' prefix is not very well explained in the docs at
http://www.postgresql.org/devel-corner/docs/postgres/functions-formatting.html
If anyone wants to suggest better wording, I'll be glad to put it in.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, dev@archonet.com, csawtell@xtra.co.nz
Subject: Re: my pgsql error?
In-Reply-To: <24923.984581391@sss.pgh.pa.us>
References: <20010314095433.E00372A683@mainbox.archonet.com> <24923.984581391@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox