Java Long Number to Date format(Long dateTmie, String formate)

Here you can find the source of format(Long dateTmie, String formate)

Description

format

License

Open Source License

Declaration

public static final String format(Long dateTmie, String formate) 

Method Source Code


//package com.java2s;

import java.text.DateFormat;

import java.text.SimpleDateFormat;
import java.util.*;

public class Main {

    public static final String format(Date date, String formate) {
        if (date == null) {
            return "";
        }//www  .j  a  va  2  s.c o m
        return getFormat(formate).format(date);
    }

    public static final String format(Long dateTmie, String formate) {
        Date date = new Date(dateTmie);
        return getFormat(formate).format(date);
    }

    public static final DateFormat getFormat(String format) {
        return new SimpleDateFormat(format);
    }
}

Related

  1. format(long date)
  2. format(Long date, String pattern)
  3. format(long date, String pattern)
  4. format(long dateInMillis, String pattern)
  5. format(Long dateMs, String type)
  6. format(long time, SimpleDateFormat format)
  7. formatDate(final long date)
  8. formatDate(final long ticks, final SimpleDateFormat format)
  9. formatDate(final long time)