标签:ice orm tar defaults str before ring get end
Date dNow = new Date(); //当前时间
Date dBefore = new Date();
Calendar calendar = Calendar.getInstance(); //得到日历
calendar.setTime(dNow);//把当前时间赋给日历
calendar.add(Calendar.DAY_OF_MONTH, -1); //设置为前一天
dBefore = calendar.getTime(); //得到前一天的时间
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //设置时间格式
String defaultStartDate = sdf.format(dBefore); //格式化前一天
IviewTm iviewTmVo = iviewTmService.selectListIviewTmById(id);
iviewTmVo.setVtime(defaultStartDate);
标签:ice orm tar defaults str before ring get end
原文地址:https://www.cnblogs.com/jerrybu/p/14684478.html