Java Long Number to Date getDatebyLong(long dt)

Here you can find the source of getDatebyLong(long dt)

Description

get Dateby Long

License

Open Source License

Declaration

public static String getDatebyLong(long 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 getDatebyLong(long dt) {
        Date date = new Date(dt);
        return formatDate(date, "yyyy-MM-dd");
    }//from w w  w.ja v  a 2s. c o  m

    public static String formatDate(Date date, String formatGeshi) {

        SimpleDateFormat format = new SimpleDateFormat(formatGeshi);

        return format.format(date);

    }
}

Related

  1. formateDate(Long date, String format)
  2. formatEpoch(long date)
  3. formatHttpDate(long d)
  4. formatHTTPDate(long pTime)
  5. formatHttpDate(long time)
  6. getDateByLongTime(long time)
  7. getDateByMis(long m)
  8. getDateByMisSecond(long misSecond)
  9. minsSecsFromMs(long ms)