Re: to_timestamp behaviour - Mailing list pgsql-novice

From Tom Lane
Subject Re: to_timestamp behaviour
Date
Msg-id 18984.1359509016@sss.pgh.pa.us
Whole thread Raw
In response to to_timestamp behaviour  (Marcel Ruff <mr@marcelruff.info>)
Responses Re: to_timestamp behaviour
List pgsql-novice
Marcel Ruff <mr@marcelruff.info> writes:
> I do this ISO date query:

>   select to_timestamp('2012-07-06T23:17:39.668Z', 'YYYY-MM-DD\THH24:MI:SS.MS'),
> '2012-07-06T23:17:39.668Z' AS ORIGINAL;

>          to_timestamp        |         original
> ----------------------------+--------------------------
>  2012-07-06 03:17:39.668+00 | 2012-07-06T23:17:39.668Z
> (1 row)

I see nothing in the to_timestamp documentation suggesting that
backslash is how to quote constant text.  Try it like this:

select to_timestamp('2012-07-06T23:17:39.668Z', 'YYYY-MM-DD"T"HH24:MI:SS.MS');

            regards, tom lane


pgsql-novice by date:

Previous
From: Marcel Ruff
Date:
Subject: to_timestamp behaviour
Next
From: Justus Mugbeh
Date:
Subject: ...