页面显示时间为object Object 是 时间Date 类型变成了String 类型
只要SimpleDateFormat就可以了
代码
vo处增加clewreciveTimeStr属性,并增加get方法以便在页面获取
public String getClewreciveTimeStr() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
this.clewreciveTimeStr = sdf.format(this.clewreciveTime);
return clewreciveTimeStr;
}
页面显示
</th>
<th field="clewreciveTimeStr" align="center" width="12%">
移交时间
</th>
结果
日期格式转换技巧
本文介绍了一种将Date类型的对象转换为符合页面展示需求的字符串格式的方法。通过使用SimpleDateFormat类,可以轻松地将时间格式调整为“yyyy-MM-dd”的样式,并在页面中正确显示。此方法适用于需要展示日期信息的各种应用。
5624

被折叠的 条评论
为什么被折叠?



