Timestampの時分秒を00:00:00に変更する
Javaで以下の様にTimestampの時分秒を0で更新した値に更新する
2020-05-06-18.23.00.000000 → 2020-05-06-00.00.00.000000
SimpleDateFormatを用いてフォーマットを指定し変換する
Timestamp now = new Timestamp(System.currentTimeMillis()); // ExpirationDateを yyyy-MM-dd 00:00:00 の形式に変換 SimpleDateFormat dateFmt = new SimpleDateFormat("yyyy-MM-dd 00:00:00"); Date newDate = dateFmt.parse(dateFmt.format(now)); Timestamp newDateTime = new Timestamp(newDate.getTime());