0

I am getting java.text.ParseException: Unparseable date: "IST" exception when i am trying to convert a String object into Date object. I tried to find the solution on the forum, but those were not helpful.

Date expiry=null;
SimpleDateFormat format = new SimpleDateFormat("E MMM dd HH:mm:ss Z yyyy");

String actualDate;
if(!(actualDate=token.nextToken()).equals("null")){
    expiry = format.parse(actualDate);
}//if
1
  • 2
    What is actualDate? Commented Jul 5, 2015 at 11:03

1 Answer 1

2

The string stored in actualDate = token.nextToken() is 'IST' which is not representing a date. Check the string source that you have tokenized to see, perhaps is not a date that is following in the token stream.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.