pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Lockhart <lockhart@fourpalms.org>
To: Andy Marden <amarden@usa.net>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Dates and year 2000
Date: Wed, 20 Feb 2002 17:54:16 -0800
Message-ID: <3C745348.EE8031F6@fourpalms.org> (raw)
References: <a4u6fh$orp$1@jupiter.hub.org>
	<a511kl$p4d$1@jupiter.hub.org>

> Is this a bug?
> > Am loading date fields from text in one table to date in another.
> > Format of the text dates is 'DD.MM.YY', so that's the format mask
> > I use. Dates for 2001 work OK - '02.09.01' translates as 
> > '2001-09-02', but '02.09.00' translates to '0001-09-02 BC'!
> > The y2k.html part of the integrated doc says that 70 - 69 equates
> > 1970 - 2069.
> > Am I missing something?
> > Version 7.1.3 on RH 7.2 BTW

What do you mean by "format mask I use"? Are you trying to enter things
like

  insert into t1 values (date '02.09.01');
  insert into t1 values (date '02.09.00');
  ...

or are you using to_date() which has the notion of templates or "masks"?

lockhart=# select date '02.09.01';
------------
 2001-02-09
lockhart=# select date '02.09.00';
------------
 2000-02-09
lockhart=# select version();
-------------------------------------------------------------
 PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by GCC 2.96

thomas=# select date '02.09.00';
    date    
------------
 2000-02-09
thomas=# select version();
-----------------------------------------------------------
 PostgreSQL 7.2 on i686-pc-linux-gnu, compiled by GCC 2.96


So, no bug unless you can be more explicit about your test case...

                    - Thomas



view thread (7+ messages)  latest in thread

Message-ID: <3C745348.EE8031F6@fourpalms.org>
Permalink:  ../3C745348.EE8031F6@fourpalms.org/
Also on:    postgresql.org/message-id/3C745348.EE8031F6@fourpalms.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lockhart@fourpalms.org, amarden@usa.net, pgsql-bugs@postgresql.org
  Subject: Re: Dates and year 2000
  In-Reply-To: <3C745348.EE8031F6@fourpalms.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox