java.util.Date nowDate = new Data();

解决方案 »

  1.   

    import java.until.*;Calendar todaysDate = new GregorianCalendar();
    year = todaysDate.get(Calendar.YEAR);
    month = todaysDate.get(Calendar.MONTH) + 1;
    day = todaysDate.get(Calendar.DAY_OF_MONTH);
    hourOfDay = todaysDate.get(Calendar.HOUR_OF_DAY);  // 24小时制
    hour = todaysDate.get(Calendar.HOUR);         // 12小时制
    minute = todaysDate.get(Calendar.MINUTE);
    second = todaysDate.get(Calendar.SECOND);
      

  2.   

    <%= new java.util.Date() %>