SimpleDateFormat: unparseable date exception

后端 未结 2 1370
挽巷
挽巷 2021-01-18 04:08

After looking after several existing posts, I am still not able to get my SimpleDateFormat parser working. Here is the code:

SimpleDateFormat df = new Simple         


        
2条回答
  •  被撕碎了的回忆
    2021-01-18 04:30

    Check your input for non-printing characters, like tab (instead of space), etc. Sometimes the reason it can't parse has little to do with the formatting of the numbers and a lot to do with unexpected characters (that you can't always see).

    Considering some people have already reported "works for me" (@Thanks Bozho!) I would strongly suspect unprintable characters in your input string. Who knows, you might have a vertical tab embedded in there somewhere!

提交回复
热议问题