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 <[EMAIL PROTECTED]> 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
>
>
>
>

Reply via email to