Java把时间毫秒数转换成日期和时间 迈不过友情╰ 2022-10-07 04:52 151阅读 0赞 ### 例如给定毫秒值: ### 1570650412089 ### 转换方法: ### public static void main(String[] args) { long milliSecond = 1570650412089L; Date date = new Date(); date.setTime(milliSecond); System.out.println(new SimpleDateFormat().format(date)); }
还没有评论,来说两句吧...