Java Date to Time ToTimeStr(Date dt)

Here you can find the source of ToTimeStr(Date dt)

Description

To Time Str

License

Open Source License

Declaration

public static String ToTimeStr(Date dt) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String ToTimeStr(Date dt) {
        if (dt == null)
            return "";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        return sdf.format(dt);
    }/*from   w  w w. j  a  v a2  s.  c  om*/
}

Related

  1. toLocalTimeString(Date d)
  2. toMT4TimeString(Date date)
  3. toSimpleDateTime(Date date)
  4. toTime(Date... date)
  5. toTimeStr(Date date)
  6. toTimeString(Date date)
  7. toTimeString(Date date)
  8. toTimeString(Date date)
  9. toTimeString(Date dateTime)