Here you can find the source of dateToMorining(Date date)
public static Date dateToMorining(Date date)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date dateToMorining(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date);//from w ww. ja va 2 s. c o m calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); return calendar.getTime(); } }