Help with java.sql.Date

Help with java.sql.Date

Post by Valentin Sac » Sat, 12 Feb 2000 04:00:00

Hallo allerseits ,

ich habe ein Problem mit dieser Klasse und zwar trage ich z.B. als neues
Datum 2000-10-10 ein , so erscheint mir in der Datenbak der Eintrag
1970-01-01 , kann mir jemand weiterhelfen ?

Danke und Ciau ,



1. vs

Hope someone can help me out.

Problem :
I want to use date as part of query to database. How do I pass that,
using JDBC, from program to db ? Formatting seems to be the issue.

I am using SilverStream as IDE, want to use end-user dates (start-,
end-date) as part of query, like :
        myTable.transDate >= myStartDate AND
        myTable.transDate <= myEndDate "

The db column (Oracle 7) transDate has type DATE. From what I have
understood, there is several types called Date; in db, in java.sql and
in java.util.
How do I convert between the formats ? Is there a general solution ? Can
I pass db-functiuons like TO_DATE (myDate, formatInfo) along in the
select statement ?
Note that the db definition cannot be changed.
(I read earlier here, "Re: and confusion...

from 1970. This approach does not work for me.)

2. Getting long binary data into Access

3. and confusion...

4. SQL Profiler hangs

5. HELP with a stupid problem

6. Transformation select (SQL 6.5)

7. Problems with java.sql.Date - Help !!!

8. Same dimension on axes and columns

9. java.sql.Date, Time, and TimeStamp with Oracle date type

10. SQL Dates and Java Dates

11. Problems with java.sql.Date and the DATE type of Oracle database

12. ---JAVA-----JAVA-----JAVA-----JAVA-----JAVA-----JAVA-----JAVA-----JAVA---

13. java.sql.Date producing a time element when passed to SQL Server datetime field