Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Dates and Java Dates and selecting the former into the later
<mike.jones_at_xenicom.com> wrote in message
news:1117644939.793569.170860_at_f14g2000cwb.googlegroups.com...
> Good points well made... Adter getting an example the problematic
> approach seems to be doing the below, I've just copied the bit I think
> relevent but if you want more ask... I should aslo point out that this
> is connecting via weblogic. I have a feeling this is relevent.
>
> while (results.next()) {
> Object value = results.getObject(1);
> System.out.println("Class we got back is " +
> value.getClass().toString());
> System.out.println("Sysdate value = " +
> value.toString());
>
> It seems that as the type is a date (as the column is) it gets it back
> as a date and thus the time element disappears!!
>
> 2 Questions:
>
> Is my thinking right?
> Is there any known way of solving this issue?
>
> Thanks,
>
> Mike.
>
I think the problem is that the casting of an "Object" to a String is the
problem. Shouldn't they cast it to a timestamp and then do a toString to a
timestamp? I think the problem is in Java not Oracle. Well, not really not
a problem with Java, but with the way they are using Java.
Jim
Received on Wed Jun 01 2005 - 23:12:33 CDT
![]() |
![]() |