Marcel Ruff <mr(at)marcelruff(dot)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