【Java】字符串转日期类型(Date类型)
作者:互联网
1 @Test 2 public void test(){ 3 String strDate = "20191214"; 4 try { 5 Date date = new SimpleDateFormat("yyyyMMdd").parse(strDate); 6 System.out.println(date); 7 } catch (ParseException e) { 8 e.printStackTrace(); 9 } 10 11 }
标签:Java,System,strDate,parse,类型,date,Date 来源: https://www.cnblogs.com/danhuai/p/12040648.html