java时间戳转为日期
public static void main(String[] args) { long l1 = new Long("1661657159000"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); Date d1 = new Date(l1); String d2 = simpleDateFormat.format(d1); System.out.println(d2); }
输出:
2022-08-28 11:25:59.000
################################
标签:java,String,d2,SimpleDateFormat,日期,new,转为,d1 From: https://www.cnblogs.com/herd/p/16632820.html