| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Karl DeBisschop <kdebisschop(at)alert(dot)infoplease(dot)com> |
| Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org>, Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> |
| Subject: | Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date() |
| Date: | 2002-12-19 15:33:57 |
| Message-ID: | 18619.1040312037@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Karl DeBisschop <kdebisschop(at)alert(dot)infoplease(dot)com> writes:
> Second is the 'T' after the date part (where you might otherwise have a
> space).
This seems to be a bug in the to_date parser:
regression=# select to_char(now(),'YYYY-MM-DDT HH24:MI:SS');
to_char
----------------------
2002-12-19T 10:32:05
(1 row)
regression=# select to_char(now(),'YYYY-MM-DD THH24:MI:SS');
to_char
----------------------
2002-12-19 T10:32:08
(1 row)
regression=# select to_char(now(),'YYYY-MM-DDTHH24:MI:SS');
to_char
-----------------------
2002-12-19THH24:32:10
(1 row)
If the first two both work, I don't see why the third case shouldn't ...
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Gibbs | 2002-12-19 15:45:16 | Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date() |
| Previous Message | Peter Gibbs | 2002-12-19 15:28:46 | Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date() |