Here you can find the source of getFirstTimeOfDay(Calendar calendar)
public static Timestamp getFirstTimeOfDay(Calendar calendar)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; import java.util.Calendar; public class Main { public static Timestamp getFirstTimeOfDay(Calendar calendar) { calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); return new Timestamp(calendar.getTimeInMillis()); }//from w ww. j a va 2s .c o m }