Java Hour Format formatDateToHMSString(java.util.Date date)

Here you can find the source of formatDateToHMSString(java.util.Date date)

Description

format Date To HMS String

License

Open Source License

Declaration

public static String formatDateToHMSString(java.util.Date date) 

Method Source Code

//package com.java2s;

public class Main {

    public static String formatDateToHMSString(java.util.Date date) {
        if (date == null) {
            return "";
        }/*from   w  w  w.  j  a  v a2  s .  co  m*/

        java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("HH:mm:ss");

        return dateFormat.format(date);

    }
}

Related

  1. formatDateTime24()
  2. formatDateTimeForSolr(Date d)
  3. formatDateTimeFull(Date dateTime)
  4. formatDateTimeStringForEquivalentCommand(final Date date)
  5. formatDateToEndDateTime(String strDate)
  6. formatDateToHours(Date time)
  7. formatDateToStr(String format, Date date)
  8. formatDateToString(java.util.Date date, int format)
  9. formatDebugMessage(String debugLevel, Object msg)