Java Hour Format formatTime(Date d)

Here you can find the source of formatTime(Date d)

Description

format Time

License

Apache License

Declaration

public static String formatTime(Date d) 

Method Source Code

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

import java.text.DateFormat;

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

public class Main {
    public static final DateFormat df = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss,SSS");
    public static final DateFormat tf = new SimpleDateFormat("HH:mm:ss");

    public static String formatTime(Date d) {
        return tf.format(d);
    }/*from ww w  .ja  va  2s  .  c  o m*/

    public static String format(Date d) {
        return df.format(d);
    }
}

Related

  1. formattedStringToDate(String date)
  2. formattedTime(long epochTime)
  3. formattedTimeForFilenames()
  4. formatterDate(Date date, byte format)
  5. formatterFor(final Thread t)
  6. formatTime(Date d)
  7. formatTime(Date date)
  8. formatTime(Date date)
  9. formatTime(Date date)