格式化日期为dd-MM-yyyy HH:mm:将实体字段推送到数据库之前的ss - PostgreSQL

时间:2017-10-05 11:44:00

标签: postgresql hibernate date

我的模型类中有Date类型的字段,如图所示

private Date dateOfBirth;

这里是吸气剂和制定者

public Date getDateOfBirth() {
        return dateOfBirth;
    }

    public void setDateOfBirth(Date dateOfBirth) {
        this.dateOfBirth = dateOfBirth;
    }

当我启动应用程序时,hiberbate更新PostgreSQL数据库,但我无法以此格式输入日期

dd-MM-yyyy HH:mm:ss

我的挑战是能够在postgres db中以上述格式输入日期。 非常感谢任何输入

0 个答案:

没有答案