Java Hour getHours(java.util.Date _date)

Here you can find the source of getHours(java.util.Date _date)

Description

get Hours

License

Open Source License

Declaration

public static int getHours(java.util.Date _date) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {

    public static int getHours(java.util.Date _date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(_date);//from  w  w  w.  j av  a 2  s.  c om
        int value = calendar.get(Calendar.HOUR);
        calendar.clear();
        return value;
    }
}

Related

  1. getHourOfWeek(Date dateIn)
  2. getHours()
  3. getHours()
  4. getHours(Date t, Date baseDate)
  5. getHours(final Date date)
  6. getHoursByDate(Date date, int hours)
  7. getHoursOfTowDiffDate(String p_startDate, String p_endDate)
  8. getLastHour()
  9. getLasthour()