private final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String timeStamp = "1658976485000"; String date = simpleDateFormat.format(Long.valueOf(timeStamp)); System.out.println(date); //输出结果:2022-07-28 02:48:05
标签:java,String,timeStamp,SimpleDateFormat,date,格式,simpleDateFormat From: https://www.cnblogs.com/lastaz3/p/17753119.html