Java Date to String dateToHMTime(Date date)

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

Description

date To HM Time

License

Open Source License

Declaration

static public String dateToHMTime(Date date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    static public String dateToHMTime(Date date) {

        if (date != null) {
            SimpleDateFormat formatter = new SimpleDateFormat("HH:mm");
            return formatter.format(date);
        } else {/* w w  w  .java 2s.c  o m*/
            return "";
        }
    }
}

Related

  1. dateToDDMMYYYYStr(Date dateTime)
  2. dateToDefaultDateString(Date date)
  3. dateToFMDate(Date date)
  4. dateToFormattedString(Date toFormat)
  5. dateToHHmmStr(Date date)
  6. dateToHttpDateString(Date d)
  7. dateToHuman(Date date)
  8. DateToInteger(Date date)
  9. dateToIso(Date d)