`

java 毫秒转日期

 
阅读更多
		String logkey = String.valueOf(System.currentTimeMillis());
		System.out.println(logkey);
		DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		Calendar calendar = Calendar.getInstance();
		calendar.setTimeInMillis(System.currentTimeMillis());
		System.out.println( " = " + formatter.format(calendar.getTime()));

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics