The java string into a date format

public static void main(String[] args) throws Exception{

Date date = new SimpleDateFormat("yyyy-MM-dd").parse("2005-06-09"); 
String now = new SimpleDateFormat("yyyy年MM月dd日").format(date);

System.out.println(now);

}

reference:

https://zhidao.baidu.com/question/154582977.html

Guess you like

Origin blog.csdn.net/l_degege/article/details/90412428