java.text.ParseException: Unparseable date: "01-06-2016"

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

Try this-

SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ssaa");

Solutions on the web

via GitHub by bruce-szalwinski
, 1 year ago
Unparseable date: "01-06-2016"
via GitHub by prashantsachan-unbxd
, 1 day ago
Unparseable date: "2017-06-07T14:38:37.625-06-07T14:38:37.625427252Z"
via Oracle Community by Anjum Ara, 1 year ago
Unparseable date: "0110"
via Google Groups by Sven Kiesewetter, 3 months ago
Unparseable date: "05/27/76"
via Coderanch by Keith Lynn, 1 year ago
Unparseable date: "00:00:59"
via Stack Overflow by Vinit89
, 2 years ago
Unparseable date: "10:00 PM"
java.text.ParseException: Unparseable date: "01-06-2016"
at java.text.DateFormat.parse(DateFormat.java:366)
at com.databricks.spark.csv.util.TypeCast$.castTo(TypeCast.scala:73)
at com.databricks.spark.csv.CsvRelation$$anonfun$buildScan$2.apply(CsvRelation.scala:120)
at com.databricks.spark.csv.CsvRelation$$anonfun$buildScan$2.apply(CsvRelation.scala:106)
at scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371)
at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:308)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)
at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:103)
at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:47)
at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:273)
at scala.collection.AbstractIterator.to(Iterator.scala:1157)
at scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:265)
at scala.collection.AbstractIterator.toBuffer(Iterator.scala:1157)
at scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:252)
at org.apache.spark.sql.execution.SparkPlan$$anonfun$5.apply(SparkPlan.scala:212)
at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
at org.apache.spark.scheduler.Task.run(Task.scala:89)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

5 times, 1 day ago
Once, 1 month ago
186 times, 3 months ago
3 times, 4 months ago
9 times, 5 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.