Java笔记获取格式化的日期

String pattern = "yyyy-MM-dd";
SimpleDateFormat df = new SimpleDateFormat(pattern);
Date today = new Date();
String tString = df.format(today);
return tString;

 

posted on 2020-08-05 10:16  Happy丶Liu  阅读(132)  评论(0编辑  收藏  举报

导航