Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Dates and Java Dates and selecting the former into the later

Re: Oracle Dates and Java Dates and selecting the former into the later

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Wed, 01 Jun 2005 20:30:26 +0200
Message-ID: <d7kuiu$u73$1@news4.zwoll1.ov.home.nl>


mike.jones_at_xenicom.com wrote:
> I've been requested to move all of our DATE columns over to timestamps
> as the Java date object does not have a time element, when a query is
> thrown to the DB and this selects a date column, the time section is
> automaticallly lost via
> JDBC.
>
> This sounds like a bag of crock to me, I'm surprised that the easiest
> option is to needlessly convert an awful lot of columns to timestamps,
> just so that JDBC can get at the time portion. I'm also concerned that
> the implication of this is more than it just allowing us to get date /
> times into Java. What are the storage implications? or are Dates /
> Timestamps synonymous at an internal level like INTEGERS, FLOATS etc?
>
> Thanks,
>
> Mike,
>

Not knowing java, but being involved in a project that heavily uses timestamps as well as dates (WITH time information!), could it just be the default time format Oracle delivers dates in? By *default* the time portion is left out!

Try NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS' in your environment, or via an alter session statement.

-- 
Regards,
Frank van Bortel
Received on Wed Jun 01 2005 - 13:30:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US