Java SQL Time getZeroTimeDate(Date fecha)

Here you can find the source of getZeroTimeDate(Date fecha)

Description

get Zero Time Date

License

Minecraft Mod Public

Declaration

public static Date getZeroTimeDate(Date fecha) 

Method Source Code

//package com.java2s;

import java.sql.Date;

import java.util.Calendar;

public class Main {
    public static Date getZeroTimeDate(Date fecha) {
        Date res = fecha;//from  ww w  . j  av a  2  s  .  c om
        Calendar calendar = Calendar.getInstance();

        calendar.setTime(fecha);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);

        res = new Date(calendar.getTime().getTime());

        return res;
    }
}

Related

  1. getServerTime()
  2. getServerTimezone(Properties dbSettings)
  3. getSGWDateTime(long dateTime)
  4. getSQLDate(long datetime)
  5. getSQLDateTime()
  6. isBetweenHours(Time hora, Time horaInicio, Time horaFim)
  7. isCategoryDateOrTime(String sJavaType)
  8. isDateTime(int type)
  9. isDateTime(String val)