datetime, JDBC, and MS Access - Mailing list pgsql-interfaces

From Oscar Serrano
Subject datetime, JDBC, and MS Access
Date
Msg-id 001401bf3918$4ec820c0$a778ebc3@pep
Whole thread Raw
In response to Re: [INTERFACES] Spanish format on date and numbers  ("Patrick Welche" <prlw1@newn.cam.ac.uk>)
List 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.




pgsql-interfaces by date:

Previous
From: "Patrick Welche"
Date:
Subject: Re: [INTERFACES] Spanish format on date and numbers
Next
From: "Brian Haney"
Date:
Subject: RE: pgsql-interfaces-digest V1 #562