reset Date To Beginning Of Day - Android java.util

Android examples for java.util:Day

Description

reset Date To Beginning Of Day

Demo Code

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Main{

    public static Date resetDateToBeginingOfDay(Date d) {
        d.setHours(0);/*from w ww.j a v a 2s.  co  m*/
        d.setMinutes(0);
        d.setSeconds(0);

        return d;
    }

}

Related Tutorials