以下のようにCalendarクラスの時刻部分に0をセットすれば実現可能です。
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS"); Calendar cal = Calendar.getInstance(); System.out.println("切捨て前:" + sdf.format(cal.getTime()) ); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); System.out.println("切捨て後:" + sdf.format(cal.getTime()) );
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。