java.text.DateFormat format1 = new java.text.SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        Calendar nowTime = Calendar.getInstance();   
           String nowDate = format1.format(new Date()); //得到当前时间  
           Calendar afterTime = Calendar.getInstance();   
           afterTime.add(Calendar.DATE, -5); //当前月份+5  
     
           String afterDate =  format1.format((Date) afterTime.getTime());
           System.out.println("今天时间"+nowDate);  
           System.out.println("修改后的 时间"+afterDate);