怎么把 2011-08-16 格式化为 2011-08-16 23:59:59 ?
谢谢。

解决方案 »

  1.   

    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
      

  2.   


    String s="2011-08-16";
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    Date d = format.parse(s+" 23:59:59");
      

  3.   

    SimpleDateFormat   formatter   =   new   SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); 
      

  4.   

    String s="2011-08-16";
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    Date d = format.parse(s+" 23:59:59");