Java Long Number to Date getDateByMis(long m)

Here you can find the source of getDateByMis(long m)

Description

get Date By Mis

License

Open Source License

Declaration

public static String getDateByMis(long m) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.util.Calendar;

public class Main {
    public static String getDateByMis(long m) {
        DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        long now = System.currentTimeMillis();
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(now + m);
        return formatter.format(calendar.getTime());

    }//  w ww.  j a v a2s.c om
}

Related

  1. formatHttpDate(long d)
  2. formatHTTPDate(long pTime)
  3. formatHttpDate(long time)
  4. getDatebyLong(long dt)
  5. getDateByLongTime(long time)
  6. getDateByMisSecond(long misSecond)
  7. minsSecsFromMs(long ms)
  8. secToDate(long secs, String format)
  9. toYMDHMSM(long tm)