JAVA笔记--如何获取年月日时分秒毫秒

类别:Java 点击:0 评论:0 推荐:
  Calendar CD = Calendar.getInstance();
  int YY = CD.get(Calendar.YEAR) ;
  int MM = CD.get(Calendar.MONTH)+1;
  int DD = CD.get(Calendar.DATE);
  int HH = CD.get(Calendar.HOUR);
  int NN = CD.get(Calendar.MINUTE);
  int SS = CD.get(Calendar.SECOND);
  int MI = CD.get(Calendar.MILLISECOND);

本文地址:http://com.8s8s.com/it/it14446.htm