I'm pretty sure I tried DATETIME with no better success. However,
TIMESTAMP, as suggested by another person on this list does appear to work
for me. Thanks all for the suggestions.
At 04:21 PM 9/1/2006, Matthew Hixson wrote:
Hi Paul, have you tried setting your MYDATE column to a type of
DATETIME? This is how we're storing date+time information.
-M@
On Sep 1, 2006, at 12:46 PM, Paul Allen wrote:
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">
INSERT INTO MYTABLE (MYDATE) VALUES (#myDate:DATE#)
</insert>
--- Oracle Table ---
CREATE TABLE MYTABLE
(
MYDATE DATE
)