My Oracle Support Banner

Error "java.text.ParseException: Unparseable date" due to Missing Trailing ".0" in Date String Retrieved from Database Using ResultSet.getString() on a Date/Timestamp Column (Doc ID 1144676.1)

Last updated on NOVEMBER 09, 2021

Applies to:

JDBC - Version to [Release 11.2]
Information in this document applies to any platform.


You have noticed that when you retrieve a DATE field from the database using the method ResultSet.getString(), the date string is missing the trailing ".0"

The value returned when the date string is fetched with Oracle JDBC is of the form:
2010-04-14 00:00:00’ 
whereas the value returned when the same is fetched with Oracle JDBC or lower versions is of the form:
2010-04-14 00:00:00.0
This causes following exception when your Java code tries to parse the value to Date format:
java.text.ParseException: Unparseable date: "2010-05-31 00:00:00"
        at java.text.DateFormat.parse(
        at JdbcVersion.selectDate(
        at JdbcVersion.main(


You have recently upgraded your Oracle JDBC driver to


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

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.