How to send a Timestamp field to Oracle stored proc. from Java despite the DB config?
Posted
by Alfabravo
on Stack Overflow
See other posts from Stack Overflow
or by Alfabravo
Published on 2010-03-24T17:50:07Z
Indexed on
2010/03/24
17:53 UTC
Read the original article
Hit count: 299
I'm making a request from a java webapp to an Oracle' stored procedure which happens to have a Timestamp IN parameter.
In the testing environment, it works sending:
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy hh:mm:ss a");
input.setTimestampField(dateFormat.format(new Date()));
But in the production environment, it raises an exception
ORA-01830: date format picture ends before converting entire input string.
I know the testing environment should be a replica of the production site, but it is not in my hands to set them properly. And I need to send the Timestamp field despite the way they setup the database. Any ideas? Thanks in advance.
© Stack Overflow or respective owner