datetime, JDBC, and MS Access

From: "Oscar Serrano" <oserra(at)fondos(dot)net>
To: <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: datetime, JDBC, and MS Access
Date: 1999-11-27 20:44:44
Message-ID: 001401bf3918$4ec820c0$a778ebc3@pep
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi:
Probably someone of you can tellme what am I doing wrong:

I create a table in psql, with an unique column of the type "date" wich name
is "columdate".
Then, via JDBC, I try to put the content of that column in a Java Date
object. OK, no problem. I write this:

Date mydate=rs.getDate("columndate");

Now I can operate with mydate normaly.

But the PROBLEM is when in psql, the column "columndate" is of the type
"datetime". In that case, the java sentence puts null to mydate.

Why as "date" works and as "datetime" it doesn't work?

If also tried this:
Timestamp mydate=rs.getTimestamp("columndate");

but it doesn't work.

I would define de column as "date" the problem is solved, but, you know, the
tables are created exporting them from MS Access via ODBC, and when exported
so, postgresql converts to "datetime" all columns that in MS Access were of
the type "Date/Hour".

I could get my problem solved if some of you knows how to tell Access to
export "Date/Hour" types to postgresql "date" in side of "datetime".

Thank you very much.

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Brian Haney 1999-11-28 08:07:18 RE: pgsql-interfaces-digest V1 #562
Previous Message Patrick Welche 1999-11-27 13:34:02 Re: [INTERFACES] Spanish format on date and numbers