java是否将时间戳格式的值更改为其他时间戳格式?
嗨,有人能告诉我如何将给定的时间戳格式更改为其他时间戳格式吗 像
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar d1 = Calendar.getInstance();
d1.setTime(formatter.parse("2012-03-08 17:32:56"));
到
"dd-MMM-yyyy HH:mm:ss"
格式
# 1 楼答案
继续^{} :
# 2 楼答案
使用新的日期格式格式化日期