ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Allen <p...@cornell.edu>
Subject RE: getting data and time into Oracle records
Date Tue, 05 Sep 2006 14:05:21 GMT
Good point. I'm using TOAD, which I think also has a similar problem. The 
ultimate solution for me was to use TIMESTAMP as the data type.

- Paul

At 05:35 PM 9/1/2006, you wrote:
>How are your verifying that you are only getting the year+month+day? I 
>know this one seems a bit odd but Oracle probably is storing the date for 
>you, down to the milliseconds. If you are using SQL+ to examine your data 
>chances are that it is formatting it based upon setting on the database or 
>within the SQL+ environment itself. I know in SQL+, when I was using it, I 
>would be forced to specify the column format for a given column to ensure 
>that I could see the actual values of the data in the format that I wanted.
>From: Paul Allen <pea1@cornell.edu> [mailto:Paul Allen <pea1@cornell.edu>]
>Sent: Friday, September 01, 2006 12:47 PM
>To: user-java@ibatis.apache.org
>Subject: getting data and time into Oracle records
>Could somebody share with me the secret to getting dates AND times into 
>Oracle DATE fields from java.util.Date properties?
>Even when I set the time portion of the java.util.Date I end up only with 
>the year+month+day in the DB.
>In a related question, where is the definative documentation for the 
>allowed format of inline parameters (i.e., the stuff between "#" and "#")?
>Thanks for any help you can offer.
>Here's what I'm doing now:
>--- Java Class ---
>public class MyBean {
>         private java.util.Date myDate;
>         ...
>         public java.util.Date getMyDate() {...}
>         public void setMyDate(java.util.Date _myDate) { ... }
>--- Ibatis Map ---
><insert id="insertMyBean" parameterClass="MyBean">
>--- Oracle Table ---

View raw message