| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Richard Huxton" <dev(at)archonet(dot)com> |
| Cc: | "Christopher Sawtell" <csawtell(at)xtra(dot)co(dot)nz>, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: my pgsql error? |
| Date: | 2001-03-14 14:49:51 |
| Message-ID: | 24923.984581391@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexaki Sofia | 2001-03-14 14:51:45 | |
| Previous Message | pgsql-sql | 2001-03-14 13:10:19 | Re(2): Permissons on database |