IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only

Error in using insert template using TO_DATE in expression

  • 1.  Error in using insert template using TO_DATE in expression

    Posted 06/09/09 01:14 PM

    Hi

    I have a string which contains a date value (2004-08-25 12:12:12).

    we have to insert this value into the table which have Date datatype.

    we created a insert adapter service where we get input as string type but when we are trying to insert we get exception.

    I tried to convert the input string to date by using TO_DATE(?,‘yyyy-mm-dd hh:mi:ss’) in the expression column but it throws me an exception when i try to insert 2004-08-25 12:12:12.

    Then I managed to write a custom sql and it is inserting fine. Also I tried to convert to date using java and it also works fine.
    But still I need to know why this is not working when using insert template using TO_DATE(?,‘yyyy-mm-dd hh:mi:ss’) in the expression column.
    Also I have another issue I am inserting value 2004-08-25 12:12:12 and it inserts fine without any error but when quering the same table it shows me 8/26/2004 0:00:00 EDT with timestamp as 0:00:00. why this happens.
    Could anyone help in resolving these issues.

    Best Regards
    Hiubert


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards