Java Hour Format formatToHour(Date date)

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

Description

format To Hour

License

Apache License

Declaration

public static String formatToHour(Date date) 

Method Source Code

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

import java.util.Date;

public class Main {
    public static String formatToHour(Date date) {
        java.text.DateFormat format = new java.text.SimpleDateFormat("yyyyMMddHH");
        return format.format(date);
    }/*w w w .  j  av a  2 s. co  m*/
}

Related

  1. formatTime(long time, TimeUnit unit)
  2. formatTime(String dateTimeString)
  3. formatTime_(String time)
  4. formatTime_1(long time_value)
  5. formatTime_2(long time_value, long frame_rate)
  6. formatToOpenMrsDate(Date date)
  7. formatToSec(Date date)
  8. formatToString(Date date)
  9. formatUIDate(Calendar calendar)