Here you can find the source of resetDayTime(Time date)
public static Time resetDayTime(Time date)
//package com.java2s; //License from project: LGPL import java.sql.Time; import java.util.Calendar; import java.util.Date; public class Main { public static Time resetDayTime(Time date) { Time result = null;//from w w w .jav a 2s. c o m result = (date != null ? new Time(resetDay(date).getTime()) : null); return result; } public static Date resetDay(Date date) { Date result = null; if (date != null) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(Calendar.DAY_OF_MONTH, 1); calendar.set(Calendar.MONTH, 0); calendar.set(Calendar.YEAR, 1970); result = calendar.getTime(); } return result; } }