java parsing string to date

后端 未结 2 1112
無奈伤痛
無奈伤痛 2020-12-11 11:50

I am trying to parse 14th March 2011 to a date in Java for a time converter application... I get 26th Dec 2010... Please help.

import java.util.*;
import jav         


        
2条回答
  •  抹茶落季
    2020-12-11 12:23

    YY should be yy (in lower case). You can find the list of available characters and their meaning in the documentation.

    Out of curiosity, more information about YY, which is for week year, here (not 100% sure what it is to be honest).

提交回复
热议问题