Skip site navigation (1) Skip section navigation (2)

Re: Problem with Dates

From: Sharon Cowling <sharon(dot)cowling(at)sslnz(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Pgsql-Novice (E-mail)" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Problem with Dates
Date: 2002-04-29 23:09:00
Message-ID: 200204292309.g3TN9rN14269@lambton.sslnz.com (view raw or flat)
Thread:
Lists: pgsql-novice
Thanks for the answer, serves me right I guess, should have made the user enter the 4 digit year, will change that now, it's no problem, the system is still in development.

Regards,
 
Sharon Cowling


-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Tuesday, 30 April 2002 10:39
To: Sharon Cowling
Cc: Pgsql-Novice (E-mail)
Subject: Re: [NOVICE] Problem with Dates


Sharon Cowling <sharon(dot)cowling(at)sslnz(dot)com> writes:
> I'm inserting data into the database (via a JSP) and I'm getting the incorrect year sometimes.
> The date is entered by the user (it is their birthdate) then inserted into the database as dd-mm-yy this works fine for most dates.  If I enter 16-10-76 it will be stored as 16/10/1976, but if I was to enter 16/10/56 it gets stored as 16/10/2056.

> Could someone direct me to some documentation or tell me how to change the date settings?  I realise why it's setting the dates this way, I just haven't been able to find how to change it.

I believe the "wrap point" for 2-digit years is fixed at 1970 --- you
can't change it without changing the C code.  You're better off tweaking
your client-side code to convert the year to 4 digits using whatever
rule you think is appropriate.

			regards, tom lane


pgsql-novice by date

Next:From: Tom LaneDate: 2002-04-30 00:06:56
Subject: Re: Denormalization question, history+ current
Previous:From: eric soroosDate: 2002-04-29 23:03:09
Subject: Denormalization question, history+ current

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group