?SimpleDateFormat dft=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
??Date beginDate = new Date();?
??Calendar date = Calendar.getInstance();??
??date.setTime(beginDate);?
??date.set(Calendar.DATE, date.get(Calendar.DATE) - 1);
??Date endDate = dft.parse(dft.format(date.getTime()));
?
?