Java Date object from String not working properly

前端 未结 2 964
一生所求
一生所求 2021-01-18 02:26

I have run into a stubborn problem I cannot seem to solve. I have looked for solutions at stackoverflow and have found a lot of posts about Java date formatting, but nothing

2条回答
  •  心在旅途
    2021-01-18 03:22

    Use yyyy not YYYY in your format string.

    YYYY is a very special thing, the calendar week year.

    See the SimpleDateFormat documentation for more info.

提交回复
热议问题