Re: Storing time values via jdbc thin driver

From: hpuxrac <>
Date: Sat, 29 Nov 2008 12:30:02 -0800 (PST)
Message-ID: <>

On Nov 28, 11:02 am, "Chris Seidel" <> wrote:
> Hi,
> I have an Oracle 9.2 database.
> If I use the 9.2 driver java.sql.Time is stored with 1900-01-01 HH:MM.
> If I use the 10.2 driver java.sql.Time is stored with 1970-01-01 HH:MM.
> Is this a know bug/feature?
> Do I have to update all my records to 1970 when using oracle 10 driver?
> Thank you

I don't understand exactly what you are trying to do.

Are you trying to store a time value from an application into a column in oracle which is in reality a date datatype in oracle?

If that's the case ... oracle stores both a date and a time in a date datatype.

If so ... you need to be careful about a database design where you are only using "part" of an oracle datatype.

It is possible to create a char definition of length 8 for a column and from the application store in a field that looks like HH:MM:SS ( Hour Hour Minute Minute Second Second ).

Of course it is also possible to use only the part of the date datatype that has time information and ignore/mask out the date portion if you know how to do it.

There is also a datatype known as systimestamp that gives you better precision below the second level for a time value ... yes it also has a date part that also you can "ditch and/or ignore".

Best place to start might be looking at the Oracle Concepts documentation and make sure that you understand the datatypes your application is trying to process against. Received on Sat Nov 29 2008 - 14:30:02 CST

Original text of this message