2005/09/27 | JAVA-如何获取年月日时分秒毫秒
类别(JAVA相关) | 评论(0) | 阅读(838) | 发表于 15:44
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);
System.out.println(YY+"-"+MM+"-"+DD+"-"+HH+"-"+NN+"-"+SS+"-"+MI);
0

评论Comments