converting timestamp to date in java

后端 未结 6 1068
既然无缘
既然无缘 2020-12-21 08:14

This is my database: \"enter

Here I have to check the query current date+status=Q info

6条回答
  •  天涯浪人
    2020-12-21 09:02

    The date column in the database should be a TIMESTAMP or DATE or TIME.

    These are retrieved as java.sql.Timestamp or java.sql.Date or java.sql.Time respectively.

    All of these classes extend java.util.Date.

    So the data should already be in the format you are asking for.

    So there is nothing to do.

提交回复
热议问题