Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2EEo4x19465 for ; Wed, 14 Mar 2001 09:50:04 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f2EEnpt24926; Wed, 14 Mar 2001 09:49:51 -0500 (EST) To: "Richard Huxton" cc: "Christopher Sawtell" , pgsql-sql@postgresql.org Subject: Re: my pgsql error? In-reply-to: <20010314095433.E00372A683@mainbox.archonet.com> References: <20010314095433.E00372A683@mainbox.archonet.com> Comments: In-reply-to "Richard Huxton" message dated "Wed, 14 Mar 2001 09:54:33 +0000" Date: Wed, 14 Mar 2001 09:49:51 -0500 Message-ID: <24923.984581391@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/271 X-Sequence-Number: 1930 > 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