java中日期转换
2019-01-02 本文已影响0人
Mrhy1996
在数据库查询的语句中,时间往往不容易被转换,现记录方法去实现时间转换
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()