Android Date Set resetTime(Date date)

Here you can find the source of resetTime(Date date)

Description

reset Time

Declaration

public static Date resetTime(Date date) 

Method Source Code

//package com.java2s;
import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date resetTime(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);/*  w ww .  j  av a  2s .  co  m*/
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return cal.getTime();
    }
}

Related

  1. time(Date date)
  2. toDateTime(Date date, Date time)
  3. offsetDate(Date date, int field, int offset)
  4. changeDate(String argDate)
  5. firstTimeOfDate(Date date)
  6. removeTime(Date date)