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

From Tom Lane
Subject Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date()
Date
Msg-id 19012.1040313051@sss.pgh.pa.us
Whole thread Raw
In response to Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date()  ("Peter Gibbs" <peter@emkel.co.za>)
Responses Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date()  (Karel Zak <zakkr@zf.jcu.cz>)
List pgsql-general
"Peter Gibbs" <peter@emkel.co.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

pgsql-general by date:

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