GetString Generates Different Format for Timestamp With JDBC 11.1 and JDBC 19c
(Doc ID 2687858.1)
Last updated on AUGUST 30, 2023
Applies to:
JDBC - Version 11.1.0.6 and laterInformation in this document applies to any platform.
Symptoms
While fetching timestamp from database from application using 19.3 ojdbc8.jar, it is noticed that a different format is generated as compared with 11.1 ojdbc6.jar.. This results in failure of application code.
The issue can be reproduced with the following steps:
1. Create the java test program:
4, Compile and run the program with 11.1.0.7 ojdbc6.jar. The result is:
>java OracleTimeStampTest
[2020/6/4 16:3:30.258]resultSet.getString() = 2010-1-1 1:1:1. 123456000
[2020/6/4 16:3:30.258]resultSet.getTimestamp().toString() = 2010-01-01 01:01:01.123456
5. Compile and run the program with 19.3 ojdbc8.jar. The result is:
java OracleTimeStampTest
[2020/6/4 16:5:11.609]resultSet.getString() = 2010-01-01 01:01:01.123456
[2020/6/4 16:5:11.609]resultSet.getTimestamp().toString() = 2010-01-01 01:01:01.123456
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |