String dateFormat = "yyyyMMddHHmmss";
SimpleDateFormat sdf = new SimpleDateFormat( dateFormat);下面怎么写?

解决方案 »

  1.   

    String s = (new SimpleDateFormat("yyyyMMddHHmmss")).format(new Date());
      

  2.   

    public final String format(Date date)
    Formats a Date into a date/time string. Parameters:
    date - the time value to be formatted into a time string. 
    Returns:
    the formatted time string.
      

  3.   

    不好意思,呵呵
    谢谢kingfish(八百里秦川@龙城异客)  angues1980(石头心)(JSP学习中)
    大家一起进步啊,呵呵
    结~~~