Java Hour getHour(Date date)

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

Description

get Hour

License

Open Source License

Declaration

public static String getHour(Date date) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

public class Main {

    public static String getHour(Date date) {
        return FormatDate(date, "HH");
    }/*from  w ww.ja  va 2 s .  c o  m*/

    public static String FormatDate(Date date, String sf) {
        if (date == null)
            return "";
        SimpleDateFormat dateformat = new SimpleDateFormat(sf);
        return dateformat.format(date);
    }
}

Related

  1. getHour(Date begin, Date end)
  2. getHour(Date d)
  3. getHour(Date d)
  4. getHour(Date d)
  5. getHour(Date date)
  6. getHour(Date date)
  7. getHour(Date date)
  8. getHour(Date date)
  9. getHour(Date date)