5

I see lots of questions like this:

DateFormate gives unparsable error

i got the error java.text.ParseException: Unparseable date

SimpleDateFormat ParseException: Unparseable date Error

The answers to all of these address the OP's unique situation, rather than explaining the general problem and solution. I would love to create a canonical question for this if one doesn't exist, but I though to ask here before doing so. Does a canonical question exist? I couldn't find one myself.

7
  • 1
    I haven't seen one, but would like one. Ditto for DateTime.ParseExact for .NET. I wrote a blog post about common issues a while ago: codeblog.jonskeet.uk/2015/05/05/…
    – Jon Skeet
    Nov 4, 2016 at 8:20
  • Wouldn't the canonical answer just be a "copy" of the official documentation?
    – user247702
    Nov 4, 2016 at 8:51
  • @Stijn: No, because it would start with a question which was like the common ones, and have an answer which explains things to look out for.
    – Jon Skeet
    Nov 4, 2016 at 8:52
  • @JonSkeet nice read, from the first sentence I read it with commandant Lassard's voice from Police Academy in my head. "There are many, MANY questions...". IMO that blog post pretty much is the canonical language-agnostic answer given how the key to all these problems really boils down to: read the darned manual more carefully, don't copy/paste existing patterns willy-nilly.
    – Gimby
    Nov 4, 2016 at 9:03
  • 5
    There is stackoverflow.com/questions/4216745/…, which I'm using for those kinds of questions. To me, that's the canonical of parsing dates in Java, and the top answer covers SimpleDateFormat, as well as Java Time. Other answers also covers Joda.
    – Tunaki
    Nov 4, 2016 at 9:33
  • 5
    We need a canonical place where we can store canonical questions so people searching for canonicals can find them easily. Canonical.
    – user1228
    Nov 4, 2016 at 15:01
  • @Will stackoverflow.com/questions/tagged/…
    – Braiam
    Nov 4, 2016 at 17:16

0

You must log in to answer this question.

Browse other questions tagged .