Java Hour getHourAndMin(long time)

Here you can find the source of getHourAndMin(long time)

Description

get Hour And Min

License

Apache License

Declaration

public static String getHourAndMin(long time) 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String getHourAndMin(long time) {
        SimpleDateFormat format = new SimpleDateFormat("HH:mm");
        return format.format(new Date(time));
    }//from  w  ww  . j  a v a  2 s.co  m
}

Related

  1. getHour(String dateString)
  2. getHour(String dateTime)
  3. getHour12(Date date)
  4. getHourAfter(Date date, int hour)
  5. getHourAfter(final Date _from, final int _hours)
  6. getHourAndMinutes(Date dt)
  7. getHourBeforeTime(int hour)
  8. getHourByZore(int hour)
  9. getHourDetails(int timeInfo)