zoukankan      html  css  js  c++  java
  • 时间格式化

    1.

     1 public class test {
     2     static String searchText="2015/9/3 0:00:00";
     3     public static void main(String[] args) {
     4         String dateTime="";
     5         SimpleDateFormat format1 = new SimpleDateFormat("yyyy/MM/dd");
     6         SimpleDateFormat format2 = new SimpleDateFormat("yyyy年MM月dd日");
     7         try {
     8             dateTime=format2.format(format1.parse(searchText));
     9 
    10         } catch (ParseException e) {
    11             // TODO Auto-generated catch block
    12             e.printStackTrace();
    13         }
    14         System.out.println(dateTime);
    15     }
    16 }
  • 相关阅读:
    NOIP提高组2004 合并果子题解
    RMQ问题之ST算法
    7.18考试
    7.18
    7.17
    7.16
    7.15
    7.14
    7.13考试
    7.13
  • 原文地址:https://www.cnblogs.com/xxwn/p/5075995.html
Copyright © 2011-2022 走看看