M. Phaneendra Vijay wrote:I am using JDK1.6 and I have downloaded the latest jdbc driver file for Oracle 10g from the Oracle site, which suggested me to use ojdbc14.jar (previously I was using the classes12.jar).
After searching on the internet, I found that it could be an issue with the NLS_TIMESTAMP_FORMAT. Now how can I set that from the java code? My java code is 24 * 7 / 365 running program. The program runs every hour.
M. Phaneendra Vijay wrote:Hi,
I found the problem with my query. The problem was not this timestamp to timestamp column. It was another column which does this
where RESULT_TIME is a timestamp and it cannot be converted to the YYYY-MM-DD format, which is throwing the error "literal does not match format string"
I changed that to CAST(RESULT_TIME AS DATE) and now it is working fine.
In SQL Developer I changed the NLS parameters for DATE format, which is why it was working in the sqldeveloper.
Sorry for troubling and thanks for your reply.