Java Timestamp Format formatTimestamp(final Date date)

Here you can find the source of formatTimestamp(final Date date)

Description

format Timestamp

License

Apache License

Declaration

public static String formatTimestamp(final Date date) 

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 formatTimestamp(final long t) {
        return formatTimestamp(new Date(t));
    }//from  www.j  a v a2  s  .com

    public static String formatTimestamp(final Date date) {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
    }
}

Related

  1. formatTimeFromTimestamp(long ts, String fmt)
  2. formatTimestamp(Date date)
  3. formatTimestamp(Date timestamp)
  4. formatTimestamp(Date timestamp)
  5. formatTimestamp(Date timestamp)
  6. formatTimestamp(final Long timestamp)
  7. formatTimeStamp(long epochTime)
  8. formatTimestamp(Long mills)
  9. formatTimestamp(long timestamp)