Re: Date problem - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Date problem
Date
Msg-id 39D42B7B.800F2870@agliodbs.com
Whole thread Raw
In response to Date problem  ("Edipo E. F. Melo" <edipoelder@ig.com.br>)
Responses Re: Date problem
List pgsql-sql
Elipo,

>         Ok. Let's work. I posted a mail before explaining a strange
> cituation if my Postgresql: when I use date_part() function to split
> day, month and year of a date type column, it returns one day before.
> In other words, '2000-01-01' returns day: 31, month:12, year: 1999.
No, I was hoping an expert would take this on.  Lemme test it on Linux:

create table test_date AS (haveadate DATE );

insert into test_date ( haveadate )values ( '2000-04-30' );

select haveadate, date_part('month',haveadate),
date_part('day',haveadate),date_part('year',haveadate) from test_date

haveadate    
2000-04-30    4    30    2000

No problem here.  Or on PG-ACCESS.  

The problem must be in the OS/2 compile, probably some problem in
accessing the internal clock?
                -Josh

-- 
______AGLIO DATABASE SOLUTIONS___________________________                                       Josh Berkus  Complete
informationtechnology      josh@agliodbs.com   and data management solutions       (415) 436-9166  for law firms, small
businesses      fax  436-0137   and non-profit organizations.       pager 338-4078                               San
Francisco


pgsql-sql by date:

Previous
From: "Edipo E. F. Melo"
Date:
Subject: Date problem
Next
From: Tom Lane
Date:
Subject: Re: Date problem