Java Day From getFirstMilliOfDay(Date date)

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

Description

get First Milli Of Day

License

Apache License

Declaration

public static Long getFirstMilliOfDay(Date date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    public static Long getFirstMilliOfDay(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);/*from ww w . j a  v a 2s . com*/
        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().getTime();
    }
}

Related

  1. getDayOfDate(Date date)
  2. getDays(Date date1, Date date2)
  3. getDays(Date sd, Date ed)
  4. getDaysBetween(int dateInt1, int dateInt2)
  5. getDaysInPastForDate(Date date)
  6. getIntervalInDaysSofar(Date from)
  7. getLastDay(Date date)
  8. getNextDay(Date startTime, int n)
  9. getNextDay(String date)