Re: this date format thing. - Mailing list pgsql-general

From Peter Haworth
Subject Re: this date format thing.
Date
Msg-id PGM.20030403113607.24804.3143@edison.ioppublishing.com
Whole thread Raw
In response to this date format thing.  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Re: this date format thing.  (Karel Zak <zakkr@zf.jcu.cz>)
Re: this date format thing.  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-general
On Wed, 2 Apr 2003 13:23:45 -0700 (MST), scott.marlowe wrote:
> While situations where 04-02 would get put in when the user meant 02-04,
> at least enough of the 02-13 cases would throw an error that the user
> would know they had been doing something wrong along the way and would
> hopefully go back and look at their data.

You wish.

jnlstats=> select version();
                           version
-------------------------------------------------------------
 PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

jnlstats=> set datestyle='ISO';
SET
jnlstats=> select '2001-12-31'::date;
    date
------------
 2001-12-31
(1 row)

jnlstats=> select '2001-31-12'::date;
    date
------------
 2001-12-31
(1 row)

jnlstats=> select to_date('2001-31-12','yyyy-mm-dd');
  to_date
------------
 2003-07-14
(1 row)


--
    Peter Haworth    pmh@edison.ioppublishing.com
"True, in chess you never get to grab your opponent, roll him around
 your hip and slam him (or her) to the floor but you get the idea"
        -- Simon Wistow


pgsql-general by date:

Previous
From: Thierry Missimilly
Date:
Subject: Problem to add a delay to a date
Next
From: Jan Wieck
Date:
Subject: Re: images in database