//Date d=new Date(System.currentTimeMillis()-1000*60*60*24*2);//计算前天Date d=new Date(System.currentTimeMillis()-1000*60*60*24);SimpleDateFormat sp=new SimpleDateFormat("yyyy-MM-dd");String zuotian=sp.format(d);//获取昨天日期
//Date d=new Date(System.currentTimeMillis()-1000*60*60*24*2);//计算前天Date d=new Date(System.currentTimeMillis()-1000*60*60*24);SimpleDateFormat sp=new SimpleDateFormat("yyyy-MM-dd");String zuotian=sp.format(d);//获取昨天日期