Date Format Issue With The OJDBC Jar Files From 12.2.1.4 “yyyy-MM-dd HH:mm:ss” Instead of “yyyy-MM-dd HH:mm:ss.S”
(Doc ID 2715606.1)
Last updated on AUGUST 07, 2023
Applies to:
Oracle WebLogic Server - Version 12.2.1.4.0 and laterInformation in this document applies to any platform.
Goal
In 12.2.1.3, the date field returns in the format “yyyy-MM-dd HH:mm:ss.S” but after the update to 12.2.1.4 the date field returns in the format “yyyy-MM-dd HH:mm:ss” (without the extra “.S” at the end). This causes the date formatting code to throw an exception because the format doesn’t match what is expected.
The code does a simple read of a date field using SQL. Then the date field is read as a String and parsed into a Date field. The code looks like:
Once the query finishes the code uses “rs.getString(1)” to return the EMP_TERMINATION_DATE field into a String variable in the format described above.
Solution
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
Goal |
Solution |
References |