首页 > 技术文章 > 给Date赋值

1306962984wei 2020-06-19 09:01 原文

//给date赋值
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date aa = format.parse("2020-02-09");
System.out.println(format.format(aa));

推荐阅读