My Oracle Support Banner

SimpleDateFormat Throws Java.text.ParseException for a Valid Date String (Doc ID 2040704.1)

Last updated on MAY 05, 2020

Applies to:

Java SE JDK and JRE - Version 7 and later
Information in this document applies to any platform.

Goal

SimpleDateFormat throws java.text.ParseException for a valid date string:  'SimpleDateFormat.parse() method Not able to parse the date string "3/8/2015 2:19:54 AM" in the time zone "(UTC-05:00) Eastern Time (US & Canada)".'

 

Caution

This sample code is provided for educational purposes only, and is not supported by Oracle Support. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using. Additionally, the code and object names used in this article represent fictitious sample names that make up an example. Any similarity to actual code is purely coincidental and not intended in any other manner.


Sample code to reproduce the issue.

 

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
 Caution
Solution
References


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