How to covert date variable to java.sql.date

后端 未结 1 367
半阙折子戏
半阙折子戏 2021-01-25 05:11

I am facing difficulties while trying to insert a date variable into a database table. My variable is called:

Date date4;

The date4 variable va

1条回答
  •  梦毁少年i
    2021-01-25 05:32

    Convert util date to sql date

        java.sql.Date sqlDate = new java.sql.Date(date4.getTime());
    

    0 讨论(0)
提交回复
热议问题