Java Timestamp Format timestampToFormattedDate(Long timestamp)

Here you can find the source of timestampToFormattedDate(Long timestamp)

Description

timestamp To Formatted Date

License

Open Source License

Declaration

public static String timestampToFormattedDate(Long timestamp) 

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 final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd.MM.yyyy HH:mm");

    public static String timestampToFormattedDate(Long timestamp) {
        if (timestamp == null) {
            return null;
        }//from   w  w  w .  j av  a2 s.  c om
        return DATE_FORMAT.format(new Date(timestamp));
    }
}

Related

  1. timestampConvertToString(int timeStamp, String format)
  2. timeStampForFileName(final String simpleDateFormat)
  3. timestampFormat(Date date)
  4. timestampFormat(final Date date)
  5. timeStampFormat(Timestamp t)
  6. timestampToString(final Date ts, final String format, final String tzId)
  7. timestampToString(Long timestamp, String formatStr)
  8. timeToString(long timestamp, SimpleDateFormat format)
  9. toDateFromTimestamp(String timestamp, String format)