You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Neverov Dm <ne...@nkmk.ru> on 2006/01/26 11:00:17 UTC

Dates in iBatis

Hi, 

explain please why I get error using such statement:

<statement ...>
           select t.d - #dn:DATETIME#
           from table1 t
</statement>

Oracle database is used.

I try to use statement:
<statement ...>
           select t.d - to_date(#dn#, 'dd.mm.yyyy hh24:mi')
           from table1 t
</statement>

#dn# in this statement is of type String, but I also get errors.

-- 
Thanks.
mailto:neverov_dg@nkmk.ru





Re: Dates in iBatis

Posted by Mark Bennett <ma...@gmail.com>.
You may want to post the actual error.  Here is how to enable the logging.
Also the ellipsis (...) may be hiding mistakes as well.

http://opensource2.atlassian.com/confluence/oss/display/IBATIS/How+do+I+get+SqlMapClient+to+log+SQL+statements

Mark

On 1/26/06, Neverov Dm <ne...@nkmk.ru> wrote:
>
> Hi,
>
> explain please why I get error using such statement:
>
> <statement ...>
>            select t.d - #dn:DATETIME#
>            from table1 t
> </statement>
>
> Oracle database is used.
>
> I try to use statement:
> <statement ...>
>            select t.d - to_date(#dn#, 'dd.mm.yyyy hh24:mi')
>            from table1 t
> </statement>
>
> #dn# in this statement is of type String, but I also get errors.
>
> --
> Thanks.
> mailto:neverov_dg@nkmk.ru
>
>
>
>
>

Re: Dates in iBatis

Posted by Brandon Goodin <br...@gmail.com>.
You need to expound. What is the error you get?

On 1/26/06, Neverov Dm <ne...@nkmk.ru> wrote:
> Hi,
>
> explain please why I get error using such statement:
>
> <statement ...>
>            select t.d - #dn:DATETIME#
>            from table1 t
> </statement>
>
> Oracle database is used.
>
> I try to use statement:
> <statement ...>
>            select t.d - to_date(#dn#, 'dd.mm.yyyy hh24:mi')
>            from table1 t
> </statement>
>
> #dn# in this statement is of type String, but I also get errors.
>
> --
> Thanks.
> mailto:neverov_dg@nkmk.ru
>
>
>
>
>