Re: Date problem

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: sqllist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Date problem
Date: 2000-09-29 05:41:15
Message-ID: 39D42B7B.800F2870@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 information technology josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-09-29 06:24:23 Re: Date problem
Previous Message Edipo E. F. Melo 2000-09-29 02:05:03 Date problem