时间,日期,日历
1 //获取当天0点时间
2 public static String getDate1(){
3
4 Calendar cal = Calendar.getInstance();
5 cal.set(Calendar.HOUR_OF_DAY, 0);//控制时
6 cal.set(Calendar.MINUTE, 0);//控制分
7 cal.set(Calendar.SECOND, 0);//控制秒
8
9 Date date= cal.getTime();
10
11 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
12 String formatTime = sdf.format(date);
13
14 return null;
15 }
Calendar.getInstance()用法 https://blog.csdn.net/qq_45536740/article/details/105261786
DATE_FORMAT函数用法 https://blog.csdn.net/weixin_41400063/article/details/83150919
DATE_FORMAT(date, format) 函数用法 https://www.jianshu.com/p/a4f9ebcb9322
Java两个日期相减 https://blog.csdn.net/u013305864/article/details/52385888
Date.compareTo()的使用规则 https://blog.csdn.net/Cjava_math/article/details/120001331
数据类型:Date类型与String的相互转换 https://blog.csdn.net/zyp00793/article/details/113754468
日期转换