ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: Problem with date format.
Date Fri, 30 Nov 2007 11:34:40 GMT
Why use a string for a date? Let the driver do it for you.

Date date = new Date();

queryForObject("some.query", date);

<select id="query" resultClass="blah">
  Select *
  from cust
  where cust_date = #value#
</select>

Larry


On Nov 30, 2007 12:33 AM, Yuvraj Shinde <Yuvraj.Shinde@sos.sungard.com> wrote:
>
>
>
>
> Hi all,
>
>
>
>    I am using dd/MM/yy date format in search querry for searching a data.
>
>
>
> For Eg
>
>
>
> Select * from cust where cust_date = 30/11/07
>
> it is giving me following exception
>
>
>
> [Oracle JDBC Driver][Oracle]ORA-01843: not a valid month.
>
>
>
>  How to set or change the date format in Ibatis. can anyone help me.
>
>
>  Regards
>
>  Yuvraj
>
>
>
>

Mime
View raw message