Error in using insert template using TO_DATE in expression

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