Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 35116 invoked from network); 1 Sep 2006 20:22:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2006 20:22:22 -0000 Received: (qmail 97254 invoked by uid 500); 1 Sep 2006 20:22:21 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 97237 invoked by uid 500); 1 Sep 2006 20:22:21 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 97226 invoked by uid 99); 1 Sep 2006 20:22:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2006 13:22:21 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [207.97.245.147] (HELO smtp147.iad.emailsrvr.com) (207.97.245.147) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2006 13:22:19 -0700 Received: from [10.35.201.7] (208.176.36.109.ptr.us.xo.net [208.176.36.109]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mhixson@activerain.com) by relay4.r5.iad.mlsrvr.com (SMTP Server) with ESMTP id ABDB2F0ED for ; Fri, 1 Sep 2006 16:21:58 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <6.2.1.2.2.20060901153637.04f26bc8@postoffice9.mail.cornell.edu> References: <6.2.1.2.2.20060901153637.04f26bc8@postoffice9.mail.cornell.edu> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <88A5CB39-EE5E-43AF-80D2-F2AB392E55B9@activerain.com> Content-Transfer-Encoding: 7bit From: Matthew Hixson Subject: Re: getting data and time into Oracle records Date: Fri, 1 Sep 2006 13:21:52 -0700 To: user-java@ibatis.apache.org X-Mailer: Apple Mail (2.752.2) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 INTO MYTABLE (MYDATE) VALUES (#myDate:DATE#) > > > --- Oracle Table --- > > CREATE TABLE MYTABLE > ( > MYDATE DATE > )