如题。

解决方案 »

  1.   


    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
    sdf.format(new Date())
      

  2.   

    具体什么格式化?在java douncment中找java.util.Date包里找对应的类!~
      

  3.   

    java.text.DateFormat.format(Date date);
      

  4.   

    日期格式
     private static SimpleDateFormat formatter =
         new SimpleDateFormat("yyyyMMdd");
     
     private static SimpleDateFormat longFormatter = 
            new SimpleDateFormat ("yyyyMMddHHmmss");
     
     private static SimpleDateFormat timeStampFormatter = 
            new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss");
     
     
     
    得到日期:
    SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd");
          String time=formatter.format(new Date());//得到当前时间