How to send a Timestamp field to Oracle stored proc. from Java despite the DB config?
- by Alfabravo
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.