Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter Gibbs" <peter(at)emkel(dot)co(dot)za>
Cc: "Karl DeBisschop" <kdebisschop(at)alert(dot)infoplease(dot)com>, "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:50:51
Message-ID: 19012.1040313051@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Peter Gibbs" <peter(at)emkel(dot)co(dot)za> writes:
> select to_char(now()+'3 days'::interval,'YYYY-MM-DDTHH24:MI:SS');
> to_char
> -----------------------
> 2002-12-22NDH24:41:58

Oh, duh --- "TH" is a format modifier. That's what's confusing it
(and today being the 19TH is what's confusing us).

So the suggestion of ... DD"T"HH ... is the way to go.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Manfred Koizar 2002-12-19 15:56:11 Re: IN or EXISTS?? faster one
Previous Message Peter Gibbs 2002-12-19 15:45:16 Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date()