new java.util.Date(System.currentTimeMillis()-*60*1000)

解决方案 »

  1.   

    new java.util.Date(System.currentTimeMillis()-5*60*1000)
      

  2.   

    Calendar theday = Calendar.getInstance();
    theday.add(Calendar.MINUTE, -5);return theday.getTime();//Date type
      

  3.   

    如果是这样怎么做?比如:
    一个Date类型的时间,求在这个时间前的 45 分 24秒的时间?
      

  4.   

    http://dev.csdn.net/develop/article/20/20844.shtm
      

  5.   

    打不开啊,给服务器屏蔽了 dev.csdn.net能不能贴到这啊
      

  6.   

    //45 分 24秒年前时间
    SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd  HH:mm:ss");
       java.util.Date myDate=new java.util.Date();     long myTime=(myDate.getTime()/1000)-60*45-24;   myDate.setTime(myTime*1000);   String mDate=formatter.format(myDate);   out.println(mDate);   out.println("<br>");