Calendar cal = Calendar.getInstance();
//当月1号
String startDate = String.valueOf(cal.get(Calendar.YEAR))+"-"+String.valueOf(cal.get(Calendar.MONTH)+1)+"-01 00:00:00";
//当天
String endDate = String.valueOf(cal.get(Calendar.YEAR))+"-"+String.valueOf(cal.get(Calendar.MONTH)+1)+"-"+String.valueOf(cal.get(Calendar.DAY_OF_MONTH))+" 00:00:00";
java日历类处理
最新推荐文章于 2024-08-01 22:48:12 发布