在数据库查询的语句中,时间往往不容易被转换,现记录方法去实现时间转换
1.时间注释
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
public String createTime;//发起时间
2.直接在sql中进行更改
to_char()
在数据库查询的语句中,时间往往不容易被转换,现记录方法去实现时间转换
1.时间注释
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
public String createTime;//发起时间
2.直接在sql中进行更改
to_char()
本文标题:java中日期转换
本文链接:https://www.haomeiwen.com/subject/ccjtrqtx.html
网友评论