Re: Problem with Dates
От | Tom Lane |
---|---|
Тема | Re: Problem with Dates |
Дата | |
Msg-id | 11730.1020119955@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Problem with Dates (Sharon Cowling <sharon.cowling@sslnz.com>) |
Список | pgsql-novice |
Sharon Cowling <sharon.cowling@sslnz.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 formost 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 thedates 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 по дате отправления: