On 01/20/2014 07:32 AM, Thomas Kellerer wrote:
Michael Nolan, 20.01.2014 16:17:
Thomas, try this:
'2013-02-31'::date
Thanks, I know this "works", but this can't be used if you have a non-ISO date string
Hmm:
test=> SELECT '2013-02-31'::date;
ERROR: date/time field value out of range: "2013-02-31"
LINE 1: SELECT '2013-02-31'::date;
^
test=> SELECT '2/31/2013'::date;
ERROR: date/time field value out of range: "2/31/2013"
LINE 1: SELECT '2/31/2013'::date;
^
test=> SELECT '2/26/2013'::date;
date
------------
2013-02-26
(1 row)
--
Adrian Klaver
adrian.klaver@xxxxxxxxx
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general