public static void main(String[] args) {
		Long time = System.currentTimeMillis();
		System.out.println(time);

		System.out.println(transferLongToDate("yyyy-MM-dd HH:mm:ss",time));

	}

	private static String transferLongToDate(String dateFormat, Long millSec) {

		SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);

		Date date = new Date(millSec);

		return sdf.format(date);

	}

 

相关文章:

  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-08-28
  • 2022-12-23
  • 2021-11-18
  • 2021-08-03
相关资源
相似解决方案